Describe the bug
The docker tries to connect all the time to the same server who timed out.
To Reproduce
docker stop vpn
docker rm vpn
docker pull bubuntux/nordvpn:latest
docker run -ti --cap-add=NET_ADMIN --device /dev/net/tun --name 'vpn'
-p port:port
-e NETWORK=network
-e USER=user -e PASS=pass
-e COUNTRY=CH
-e CATEGORY='Standard VPN servers'
-e "OPENVPN_OPTS=--pull-filter ignore ping-restart --ping-exit 180"
-e GROUP_ID=2
-d bubuntux/nordvpn:latest
Logs
Staring firewall...
,Adding network route ...
,Whitelisting downloads.nordcdn.com...
,Downloading config files...
,Whitelisting api.nordvpn.com...
,Selecting the best server...
,Searching for country : CH (209)
,Searching for group: legacy_standard
,Best server : ch82.nordvpn.com
,Using config file /vpn/ovpn/ch82.nordvpn.com.tcp.ovpn...
,Connecting ...
,+ sg vpn -c 'openvpn --config /vpn/ovpn/ch82.nordvpn.com.tcp.ovpn --auth-user-pass /vpn/auth --auth-nocache --script-security 2 --up /etc/openvpn/up.sh --down /etc/openvpn/down.sh --pull-filter ignore ping-restart --ping-exit 180'
,Sun Apr 28 07:50:21 2019 OpenVPN 2.4.6 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Nov 26 2018
,Sun Apr 28 07:50:21 2019 library versions: OpenSSL 1.1.1b 26 Feb 2019, LZO 2.10
,Sun Apr 28 07:50:21 2019 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
,Sun Apr 28 07:50:21 2019 NOTE: --fast-io is disabled since we are not using UDP
,Sun Apr 28 07:50:21 2019 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
,Sun Apr 28 07:50:21 2019 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
,Sun Apr 28 07:50:21 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]185.236.201.141:443
,Sun Apr 28 07:50:21 2019 Socket Buffers: R=[87380->87380] S=[16384->16384]
,Sun Apr 28 07:50:21 2019 Attempting to establish TCP connection with [AF_INET]185.236.201.141:443 [nonblock]
,Sun Apr 28 07:52:21 2019 TCP: connect to [AF_INET]185.236.201.141:443 failed: Operation timed out
,Sun Apr 28 07:52:21 2019 SIGUSR1[connection failed(soft),init_instance] received, process restarting
,Sun Apr 28 07:52:21 2019 Restart pause, 5 second(s)
,Sun Apr 28 07:52:26 2019 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
,Sun Apr 28 07:52:26 2019 NOTE: --fast-io is disabled since we are not using UDP
,Sun Apr 28 07:52:26 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]185.236.201.141:443
,Sun Apr 28 07:52:26 2019 Socket Buffers: R=[87380->87380] S=[16384->16384]
,Sun Apr 28 07:52:26 2019 Attempting to establish TCP connection with [AF_INET]185.236.201.141:443 [nonblock]
,Sun Apr 28 07:54:26 2019 TCP: connect to [AF_INET]185.236.201.141:443 failed: Operation timed out
,Sun Apr 28 07:54:26 2019 SIGUSR1[connection failed(soft),init_instance] received, process restarting
,Sun Apr 28 07:54:26 2019 Restart pause, 5 second(s)
,Sun Apr 28 07:54:31 2019 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
,Sun Apr 28 07:54:31 2019 NOTE: --fast-io is disabled since we are not using UDP
,Sun Apr 28 07:54:31 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]185.236.201.141:443
,Sun Apr 28 07:54:31 2019 Socket Buffers: R=[87380->87380] S=[16384->16384]
,Sun Apr 28 07:54:31 2019 Attempting to establish TCP connection with [AF_INET]185.236.201.141:443 [nonblock]
,Sun Apr 28 07:56:31 2019 TCP: connect to [AF_INET]185.236.201.141:443 failed: Operation timed out
,Sun Apr 28 07:56:31 2019 SIGUSR1[connection failed(soft),init_instance] received, process restarting
,Sun Apr 28 07:56:31 2019 Restart pause, 5 second(s)
,Sun Apr 28 07:56:36 2019 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
,Sun Apr 28 07:56:36 2019 NOTE: --fast-io is disabled since we are not using UDP
,Sun Apr 28 07:56:36 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]185.236.201.141:443
,Sun Apr 28 07:56:36 2019 Socket Buffers: R=[87380->87380] S=[16384->16384]
,Sun Apr 28 07:56:36 2019 Attempting to establish TCP connection with [AF_INET]185.236.201.141:443 [nonblock]
,Sun Apr 28 07:58:36 2019 TCP: connect to [AF_INET]185.236.201.141:443 failed: Operation timed out
,Sun Apr 28 07:58:36 2019 SIGUSR1[connection failed(soft),init_instance] received, process restarting
,Sun Apr 28 07:58:36 2019 Restart pause, 5 second(s)
,Sun Apr 28 07:58:41 2019 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
,Sun Apr 28 07:58:41 2019 NOTE: --fast-io is disabled since we are not using UDP
,Sun Apr 28 07:58:41 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]185.236.201.141:443
,Sun Apr 28 07:58:41 2019 Socket Buffers: R=[87380->87380] S=[16384->16384]
,Sun Apr 28 07:58:41 2019 Attempting to establish TCP connection with [AF_INET]185.236.201.141:443 [nonblock]
,Sun Apr 28 08:00:41 2019 TCP: connect to [AF_INET]185.236.201.141:443 failed: Operation timed out
,Sun Apr 28 08:00:41 2019 SIGUSR1[connection failed(soft),init_instance] received, process restarting
,Sun Apr 28 08:00:41 2019 Restart pause, 10 second(s)
,Sun Apr 28 08:00:51 2019 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
,Sun Apr 28 08:00:51 2019 NOTE: --fast-io is disabled since we are not using UDP
,Sun Apr 28 08:00:51 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]185.236.201.141:443
,Sun Apr 28 08:00:51 2019 Socket Buffers: R=[87380->87380] S=[16384->16384]
,Sun Apr 28 08:00:51 2019 Attempting to establish TCP connection with [AF_INET]185.236.201.141:443 [nonblock]
,Sun Apr 28 08:02:51 2019 TCP: connect to [AF_INET]185.236.201.141:443 failed: Operation timed out
,Sun Apr 28 08:02:51 2019 SIGUSR1[connection failed(soft),init_instance] received, process restarting
,Sun Apr 28 08:02:51 2019 Restart pause, 20 second(s)
,Sun Apr 28 08:03:11 2019 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
,Sun Apr 28 08:03:11 2019 NOTE: --fast-io is disabled since we are not using UDP
,Sun Apr 28 08:03:11 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]185.236.201.141:443
,Sun Apr 28 08:03:11 2019 Socket Buffers: R=[87380->87380] S=[16384->16384]
,Sun Apr 28 08:03:11 2019 Attempting to establish TCP connection with [AF_INET]185.236.201.141:443 [nonblock]
,Sun Apr 28 08:05:11 2019 TCP: connect to [AF_INET]185.236.201.141:443 failed: Operation timed out
,Sun Apr 28 08:05:11 2019 SIGUSR1[connection failed(soft),init_instance] received, process restarting
,Sun Apr 28 08:05:11 2019 Restart pause, 40 second(s)
,Sun Apr 28 08:05:51 2019 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
,Sun Apr 28 08:05:51 2019 NOTE: --fast-io is disabled since we are not using UDP
,Sun Apr 28 08:05:51 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]185.236.201.141:443
,Sun Apr 28 08:05:51 2019 Socket Buffers: R=[87380->87380] S=[16384->16384]
,Sun Apr 28 08:05:51 2019 Attempting to establish TCP connection with [AF_INET]185.236.201.141:443 [nonblock]
,Sun Apr 28 08:07:51 2019 TCP: connect to [AF_INET]185.236.201.141:443 failed: Operation timed out
,Sun Apr 28 08:07:51 2019 SIGUSR1[connection failed(soft),init_instance] received, process restarting
,Sun Apr 28 08:07:51 2019 Restart pause, 80 second(s)
,Sun Apr 28 08:09:11 2019 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
,Sun Apr 28 08:09:11 2019 NOTE: --fast-io is disabled since we are not using UDP
,Sun Apr 28 08:09:11 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]185.236.201.141:443
,Sun Apr 28 08:09:11 2019 Socket Buffers: R=[87380->87380] S=[16384->16384]
,Sun Apr 28 08:09:11 2019 Attempting to establish TCP connection with [AF_INET]185.236.201.141:443 [nonblock]
,
Additional context*
A Server connection is working if iam lucky on the COUNTRY and SERVER combination. But the problem is that he will not ignore an broken server and try another one.
-e OPENVPN_OPTS='--pull-filter ignore "ping-restart" --ping-exit 180' isn't working too.
Thank you!