Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have setup OpenVPN. The server is a router running DD-WRT with OpenVPN setup. The client is Ubuntu 12.04. The connection is established without issues. I can ping clients at the VPN side. The problem is every 5-10min (seems slightly variant) the following occurs on the Ubuntu Client:

Fri Jan 18 17:01:45 2013 OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Mar 30 2012
Fri Jan 18 17:01:45 2013 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Fri Jan 18 17:01:45 2013 WARNING: file 'client1.key' is group or others accessible
Fri Jan 18 17:01:45 2013 UDPv4 link local: [undef]
Fri Jan 18 17:01:45 2013 UDPv4 link remote: [AF_INET]VPN_IP_ADDY:1194
Fri Jan 18 17:01:47 2013 [VPN_HOST_NAME] Peer Connection Initiated with [AF_INET]VPN_IP_ADDY:1194
Fri Jan 18 17:01:49 2013 TUN/TAP device tun0 opened
Fri Jan 18 17:01:49 2013 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Fri Jan 18 17:01:49 2013 /sbin/ifconfig tun0 192.168.66.6 pointopoint 192.168.66.5 mtu 1500
Fri Jan 18 17:01:49 2013 WARNING: potential route subnet conflict between local LAN [192.168.1.0/255.255.255.0] and remote VPN [192.168.1.0/255.255.255.0]
Fri Jan 18 17:01:49 2013 Initialization Sequence Completed

Fri Jan 18 17:04:10 2013 read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Fri Jan 18 17:04:10 2013 read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Fri Jan 18 17:04:10 2013 read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Fri Jan 18 17:04:10 2013 read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Fri Jan 18 17:04:10 2013 read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Fri Jan 18 17:04:10 2013 read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Fri Jan 18 17:04:12 2013 read UDPv4 [ECONNREFUSED]: Connection refused (code=111)

Fri Jan 18 17:07:11 2013 [VPN_HOST_NAME] Inactivity timeout (--ping-restart), restarting
Fri Jan 18 17:07:11 2013 SIGUSR1[soft,ping-restart] received, process restarting
Fri Jan 18 17:07:13 2013 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Fri Jan 18 17:07:13 2013 Re-using SSL/TLS context
Fri Jan 18 17:07:13 2013 UDPv4 link local: [undef]
Fri Jan 18 17:07:13 2013 UDPv4 link remote: [AF_INET]VPN_IP_ADDY:1194
Fri Jan 18 17:07:14 2013 [VPN_IP_ADDY] Peer Connection Initiated with [AF_INET]VPN_IP_ADDY:1194
Fri Jan 18 17:07:17 2013 Preserving previous TUN/TAP instance: tun0
Fri Jan 18 17:07:17 2013 Initialization Sequence Completed

It then auto reconnects and 5-10min later it repeats this cycle forever.

It times out even though I'm running a rsync transfer over the VPN. The timeout and reconnect does not effect the rsync transfer except stalling it for 30s. Clients do not notice except that file transfers will stop for 30s while it attempts to reconnect.

I'm using in my server config 'keepalive 10 120'. I also tried 'keepalive 1 180' which made no difference.

I think the connection refused errors are the keepalive ping attempts?

share|improve this question
    
any insights to share? I am seeing a similar scenario on my server that has a VPN tunnel into an AWS webserver. Thanks. –  Dinesh Dec 2 at 4:54
    
I believe it came down to the ISP. I had the end point switch ISPs and immediately the problem went away. Now considering there are hundreds of other issues that could be at play it is hard to point fingers. Every since switching ISPs though, that day, connection stays open forever without any issues. –  Halsafar Dec 3 at 17:58
    
thanks, but I don't think I can get my customer to switch ISP :( Was your server on AWS (mine is)? There is a very visible pattern of incidence of retransmissions over a week of data, but econnrefused's appear random. –  Dinesh Dec 4 at 0:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.