network-manager-vpnc disconnects after about 5 to 6 minutes

Bug #206000 reported by Eric Krieger
34
This bug affects 2 people
Affects Status Importance Assigned to Milestone
network-manager-vpnc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: network-manager-vpnc

Release: Ubuntu 8.04 - Hardy Heron - Development Branch
Package Verision: network-manager-vpnc:
  Installed: 0.6.4svn2422-0ubuntu5
  Candidate: 0.6.4svn2422-0ubuntu5
  Version table:
 *** 0.6.4svn2422-0ubuntu5 0
        500 http://us.archive.ubuntu.com hardy/universe Packages
        100 /var/lib/dpkg/status

Expectation: Expected the VPN tunnel to stay up as it was still in use (i.e. ssh sessions, RDP, mail, ect.).

What Happened: Even though the VPN tunnel was in use it repeatedly disconnects after about 5 to 6 minutes.

Here are the entries from syslog.

Mar 24 07:19:14 gkar NetworkManager: <info> Will activate VPN connection 'Work', service 'org.freedesktop.NetworkManager.vpnc', user_name 'XXXXXX', vpn_data 'IPSec gateway / xxx.xxx.xxx.xxx / IPSec ID / XXXX', route 'xxx.xxx.xxx.xxx/16 / xxx.xxx.xxx.xxx/16 / xxx.xxx.xxx.xxx/24'.
Mar 24 07:19:14 gkar NetworkManager: <info> VPN Activation (Work) Stage 1 of 4 (Connection Prepare) scheduled...
Mar 24 07:19:14 gkar NetworkManager: <info> VPN Activation (Work) Stage 1 of 4 (Connection Prepare) ran VPN service daemon org.freedesktop.NetworkManager.vpnc (PID 30858)
Mar 24 07:19:14 gkar NetworkManager: <info> VPN Activation (Work) Stage 1 of 4 (Connection Prepare) complete.
Mar 24 07:19:14 gkar NetworkManager: <info> VPN Activation (Work) Stage 2 of 4 (Connection Prepare Wait) scheduled...
Mar 24 07:19:14 gkar NetworkManager: <info> VPN service 'org.freedesktop.NetworkManager.vpnc' signaled state change 1 -> 6.
Mar 24 07:19:14 gkar NetworkManager: <info> VPN Activation (Work) Stage 2 of 4 (Connection Prepare Wait) waiting...
Mar 24 07:19:14 gkar NetworkManager: <info> VPN Activation (Work) Stage 2 of 4 (Connection Prepare Wait) complete.
Mar 24 07:19:14 gkar NetworkManager: <info> VPN Activation (Work) Stage 3 of 4 (Connect) scheduled...
Mar 24 07:19:14 gkar NetworkManager: <info> VPN Activation (Work) Stage 3 of 4 (Connect) sending connect request.
Mar 24 07:19:14 gkar NetworkManager: <info> VPN Activation (Work) Stage 3 of 4 (Connect) request sent, waiting for reply...
Mar 24 07:19:14 gkar NetworkManager: <info> VPN service 'org.freedesktop.NetworkManager.vpnc' signaled state change 6 -> 3.
Mar 24 07:19:14 gkar NetworkManager: <info> VPN Activation (Work) Stage 3 of 4 (Connect) reply received.
Mar 24 07:19:14 gkar NetworkManager: <info> VPN Activation (Work) Stage 4 of 4 (IP Config Get) timeout scheduled...
Mar 24 07:19:14 gkar NetworkManager: <info> VPN Activation (Work) Stage 3 of 4 (Connect) complete, waiting for IP configuration...
Mar 24 07:19:14 gkar kernel: [ 5624.059328] tun0: Disabled Privacy Extensions
Mar 24 07:19:15 gkar NetworkManager: <info> VPN Activation (Work) Stage 4 of 4 (IP Config Get) reply received.
Mar 24 07:19:16 gkar NetworkManager: <info> Clearing nscd hosts cache.
Mar 24 07:19:16 gkar NetworkManager: <WARN> nm_spawn_process(): nm_spawn_process('/usr/sbin/nscd -i hosts'): could not spawn process. (Failed to execute child process "/usr/sbin/nscd" (No such file or directory))
Mar 24 07:19:16 gkar NetworkManager: <info> VPN Activation (Work) Stage 4 of 4 (IP Config Get) complete.
Mar 24 07:19:16 gkar NetworkManager: <info> VPN Activation (Work) successful.
Mar 24 07:19:16 gkar NetworkManager: <info> VPN service 'org.freedesktop.NetworkManager.vpnc' signaled state change 3 -> 4.
Mar 24 07:24:45 gkar vpnc[30861]: connection terminated by dead peer detection
Mar 24 07:24:45 gkar NetworkManager: <info> VPN service 'org.freedesktop.NetworkManager.vpnc' signaled state change 4 -> 6.
Mar 24 07:24:45 gkar NetworkManager: <info> Clearing nscd hosts cache.
Mar 24 07:24:45 gkar NetworkManager: <WARN> nm_spawn_process(): nm_spawn_process('/usr/sbin/nscd -i hosts'): could not spawn process. (Failed to execute child process "/usr/sbin/nscd" (No such file or directory))
Mar 24 07:24:45 gkar avahi-daemon[5399]: Withdrawing address record for xxx.xxx.xxx.xxx on eth0.
Mar 24 07:24:45 gkar avahi-daemon[5399]: Leaving mDNS multicast group on interface eth0.IPv4 with address xxx.xxx.xxx.xxx.
Mar 24 07:24:45 gkar avahi-daemon[5399]: Interface eth0.IPv4 no longer relevant for mDNS.
Mar 24 07:24:45 gkar avahi-daemon[5399]: Joining mDNS multicast group on interface eth0.IPv4 with address xxx.xxx.xxx.xxx.
Mar 24 07:24:45 gkar avahi-daemon[5399]: New relevant interface eth0.IPv4 for mDNS.
Mar 24 07:24:45 gkar avahi-daemon[5399]: Registering new address record for xxx.xxx.xxx.xxx on eth0.IPv4.
Mar 24 07:24:46 gkar NetworkManager: <WARN> nm_vpn_service_stop_connection(): (VPN Service org.freedesktop.NetworkManager.vpnc): could not stop connection 'Work' because service was 6.

Revision history for this message
Michael Plump (plumpy) wrote :

This happens to me too with the same version of vpnc and the same messages in syslog. This is a regression from Gutsy, in which I could stay connected for days.

Revision history for this message
cbrmichi (cbrmichi) wrote :

this happens for me too!

Revision history for this message
cbrmichi (cbrmichi) wrote :

Apr 24 08:56:13 earth NetworkManager: <info> VPN Activation (Hoersaal/WLan) successful.
Apr 24 08:56:13 earth NetworkManager: <info> VPN service 'org.freedesktop.NetworkManager.vpnc' signaled state change 3 -> 4.
Apr 24 09:05:12 earth vpnc[8888]: connection terminated by dead peer detection
Apr 24 09:05:12 earth NetworkManager: <info> VPN service 'org.freedesktop.NetworkManager.vpnc' signaled state change 4 -> 6.
Apr 24 09:05:12 earth NetworkManager: <info> Clearing nscd hosts cache.
Apr 24 09:05:12 earth NetworkManager: <WARN> nm_spawn_process(): nm_spawn_process('/usr/sbin/nscd -i hosts'): could not spawn process. (Failed to execute child process "/usr/sbin/nscd" (No such file or directory))
Apr 24 09:05:12 earth avahi-daemon[5797]: Withdrawing address record for 192.168.235.39 on eth1.
Apr 24 09:05:12 earth avahi-daemon[5797]: Leaving mDNS multicast group on interface eth1.IPv4 with address 192.168.235.39.
Apr 24 09:05:12 earth avahi-daemon[5797]: Interface eth1.IPv4 no longer relevant for mDNS.
Apr 24 09:05:12 earth avahi-daemon[5797]: Joining mDNS multicast group on interface eth1.IPv4 with address 192.168.235.39.
Apr 24 09:05:12 earth avahi-daemon[5797]: New relevant interface eth1.IPv4 for mDNS.
Apr 24 09:05:12 earth avahi-daemon[5797]: Registering new address record for 192.168.235.39 on eth1.IPv4.
Apr 24 09:05:13 earth NetworkManager: <WARN> nm_vpn_service_stop_connection(): (VPN Service org.freedesktop.NetworkManager.vpnc): could not stop connection 'Hoersaal/WLan' because service was 6.
Apr 24 09:17:01 earth /USR/SBIN/CRON[9878]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)

i'm using the latest hardy heron.

Revision history for this message
cbrmichi (cbrmichi) wrote :

same problem with vpnc.

fix for vpnc:
vpnc --dpd-idle 0

Revision history for this message
Marc Luethi (netztier) wrote :

> cbrmichi wrote on 2008-04-24: (permalink)

> fix for vpnc:
> vpnc --dpd-idle 0

I assume that network-manager-vpnc calls vpnc anyway, so might there be a way to add a command line option that should be used when it does so?

network-manager-vpnc's config can be edited via gconf-editor (which in turn stores it's information somwhere as XML) - is there an option that could be inserted right there? I am no programmer, so I don't think it would help if I went ahead and looked at network-manager-vpnc's source code...

regards

Marc

Revision history for this message
nightelf (night-elf-18) wrote :

everything OK but how do i repair that
vpnc --dpd-idle 0 didn't work

Revision history for this message
levmatta (levmatta) wrote :

I have this problem also, please help.

Revision history for this message
Marc Luethi (netztier) wrote :

See comment No. 4 in Bug #206673

https://bugs.launchpad.net/ubuntu/+source/vpnc/+bug/206673/comments/4

Chris has made .debs available here on launchpad for a version of vpnc that has the DPD timeout defaulted to 0 (i.e. disabled). I could add them easily on the 8.04 install on my HP Compaq 6910p, they replace the normal vpnc package from the repos.

Be careful when installing this - disabling DPD like this on a global basis might not be what you need. Some of your VPN connections might require it, others might not. With this workaround, you can't set this property on a per-connection basis.

Revision history for this message
Tim Jones (tim-mr-dog) wrote :

Would this count as a duplicate of the bug #112406 ?

Revision history for this message
luigi massa (info-luigi-massa) wrote :

Hi,
I've Intrepid release and I've the same problem.

Revision history for this message
Marc Luethi (netztier) wrote : Re: [Bug 206000] Re: network-manager-vpnc disconnects after about 5 to 6 minutes

On Fri, 2009-04-10 at 11:55 +0000, luigi massa wrote:
> Hi,
> I've Intrepid release and I've the same problem.
>

The network manager in Ubuntu 8.10 already has the "Disable DPD"
checkbox in the VPN connection properties dialog box.

If DPD causes disconnections, then activate that checkbox.

regards

Marc

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Marking this bug as fix released, because there is a way to set per-connection usage of DPD in Intrepid and later versions. The issue is caused by DPD finding out that the other end doesn't respond, for various reasons like some traffic not being permitted through a firewall, or not reaching the destination.

Changed in network-manager-vpnc (Ubuntu):
status: New → Fix Released
Revision history for this message
bb (ben-beker) wrote :

I tried 'vpnc -dpd--idle 0' option in both 9.04 and 9.10. It does not seem to work. It worked fine in 8.10 w/ and w/o dpd-idle 0 option.

More detailed description:

1. I use vpnc --dpd-idle 0 myvpn.conf to get to the network behind a firewall.
2. Connection is made properly and I am able to access all resources behind the firewall.
3. After several minutes of inactivity my applications such as network drives, email, etc. stop responding.
4. typing vpnc-disconnect returns appropriate response "vpnc ... terminated" (this is same as when termination the vpn session within couple of minutes of starting it)
5. trying to access the web with firefox fails.
6. trying to start vpnc again fails.
7. restarting the computer allows for everything to function properly again.
8. what also seems to work w/o restarting the computer is deleting resolv.conf in /etc directory and regenerating it with a sudo ln -s /etc/resolvconf/run/resolv.conf
9. however, even after following step 8 the same problem occurs after several minutes of inactivity after logging back in.

Hardware:

HP pavilion w/ AMD CPU w/ 2GB of RAM and Nvidia gfx card 0.5GB of RAM
HP Compaq 6715b w/ AMD CPU w/ 2GB of RAM and integrated ATI gfx card

OS: Only Ubuntu installed (no Win) - tried 8.10, 9.04, and 9.10

Software: vpnc always installed using package manager ony.

In 9.10 using - Version: 0.8~a~git.20091008t124012.f5b95a2-0ubuntu1 (network-manager-vpnc)
In 9.04 using - 0.7.1~rc4.20090316+bzr21-0Ubuntu2 (network manager); 0.5.3-1 (vpn client)
In 8.10 - no longer have it installed so not sure what the version was

Revision history for this message
Maxxer (lorenzo-milesi) wrote :

happening here as well (9.10).
seems checking "Disable dead peer detection" in connection details solved the problem.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.