nordvpn
nordvpn copied to clipboard
Timeout when running best
I have a timeout when running the best-command. I have added the verbose output.
> sudo nordvpn -v best -r eu -n 10
+ shift
+ '[' 5 -ne 0 ']'
+ case "$1" in
+ command=best
+ shift
+ break
+ '[' -z best ']'
++ id -u
+ '[' 0 -ne 0 ']'
++ find /etc/openvpn/client -type f -name '*.nordvpn.com.*.ovpn'
++ wc -l
+ declare -r -i files_present=9955
+ declare -r -i up_to_date=1
+ '[' 9955 -eq 0 ']'
+ '[' best '!=' status ']'
+ '[' 1 -eq 0 ']'
+ case $command in
+ case "$1" in
++ ensure_infos -r
++ declare -i force_update=0
++ case "$1" in
++ declare -r servers_filename=/tmp/nordvpn_servers.json
++ '[' 0 -eq 1 ']'
++ '[' '!' -f /tmp/nordvpn_servers.json ']'
+++ find /tmp/nordvpn_servers.json -mmin +15
++ '[' '!' -z '' ']'
++ echo /tmp/nordvpn_servers.json
++ return
+ servers_filename=/tmp/nordvpn_servers.json
+ test 0 -eq 0
+ run_servers /tmp/nordvpn_servers.json --ranking -r eu -n 10
+ which python3
+ timeout -v --signal=SIGINT 1m python3 /etc/openvpn/client/nordvpn/servers.py /tmp/nordvpn_servers.json --ranking -r eu -n 10
timeout: sending signal INT to command ‘python3’
Traceback (most recent call last):
File "/etc/openvpn/client/nordvpn/servers.py", line 186, in <module>
print(get_best(servers, args))
File "/etc/openvpn/client/nordvpn/servers.py", line 105, in get_best
pings = pingservers(servers.name.tolist(), count=args.pingcount)
File "/etc/openvpn/client/nordvpn/servers.py", line 78, in pingservers
callsig + addresses, check=False, universal_newlines=True, stderr=PIPE)
File "/usr/lib/python3.7/subprocess.py", line 455, in run
stdout, stderr = process.communicate(input, timeout=timeout)
File "/usr/lib/python3.7/subprocess.py", line 910, in communicate
stderr = self.stderr.read()
KeyboardInterrupt
Is this a network-timeout (I have a connection) or another error?
My system runs on Linux 4.18.12-arch1-1-ARCH x86_64
Hi!
My guess is that you probably ran it with a vpn connection already established. Can you make sure no vpn connection is active when you run the best command? It this is the case, we'll have to protect the call.
Alternatively, do you know that the start command now uses nordvpn.com to find a recommended server? It is not yet able to select it by country but that might be a good alternative.
No I didn't run it with active VPN, but I just started using it by manually selecting a server. Connecting to a selected server works fine.
Can confirm this. Happens when connected and disconnected from any vpns.
sudo nordvpn -v best -r na
+ shift
+ '[' 3 -ne 0 ']'
+ case "$1" in
+ command=best
+ shift
+ break
+ '[' -z best ']'
++ id -u
+ '[' 0 -ne 0 ']'
++ find /etc/openvpn/client -type f -name '*.nordvpn.com.*.ovpn'
++ wc -l
+ declare -r -i files_present=9875
+ declare -r -i up_to_date=1
+ '[' 9875 -eq 0 ']'
+ '[' best '!=' status ']'
+ '[' 1 -eq 0 ']'
+ case $command in
+ case "$1" in
++ ensure_infos -r
++ declare -i force_update=0
++ case "$1" in
++ declare -r servers_filename=/tmp/nordvpn_servers.json
++ '[' 0 -eq 1 ']'
++ '[' '!' -f /tmp/nordvpn_servers.json ']'
+++ find /tmp/nordvpn_servers.json -mmin +15
++ '[' '!' -z '' ']'
++ echo /tmp/nordvpn_servers.json
++ return
+ servers_filename=/tmp/nordvpn_servers.json
+ test 0 -eq 0
+ run_servers /tmp/nordvpn_servers.json --ranking -r na
+ which python3
+ timeout -v --signal=SIGINT 1m python3 /etc/openvpn/client/nordvpn/servers.py /tmp/nordvpn_servers.json --ranking -r na
timeout: sending signal INT to command ‘python3’
Traceback (most recent call last):
File "/etc/openvpn/client/nordvpn/servers.py", line 186, in <module>
print(get_best(servers, args))
File "/etc/openvpn/client/nordvpn/servers.py", line 105, in get_best
pings = pingservers(servers.name.tolist(), count=args.pingcount)
File "/etc/openvpn/client/nordvpn/servers.py", line 78, in pingservers
callsig + addresses, check=False, universal_newlines=True, stderr=PIPE)
File "/usr/lib/python3.7/subprocess.py", line 468, in run
stdout, stderr = process.communicate(input, timeout=timeout)
File "/usr/lib/python3.7/subprocess.py", line 923, in communicate
stderr = self.stderr.read()
KeyboardInterrupt
My system is Linux 4.18.16-arch1-1-ARCH x86_64
.
Can confirm, also still present.
This commit is the problem: https://github.com/nstinus/nordvpn/commit/daf5ff0b62fe919b2c7b4daf5cc5598e1adb0b7f
Quick workaround for everyone with this problem is to change line 54 into:
python3 /etc/openvpn/client/nordvpn/servers.py $@
But I'll leave up @nstinus the proper solution.