Public bug reported:

I have a short cron job to check the status of an openvpn tunnel every
so often and restart the link if it seems lost.

*/5 * * * * ping -c1 172.16.30.1 >/dev/null 2>&1 || PATH=$PATH:/sbin
/etc/init.d/openvpn restart >/dev/null 2>&1

Most of the time this works okay.  However, occasionally it goes haywire
in that the script does not think any OpenVPN process is running:

# /etc/init.d/openvpn stop
 * Stopping virtual private network daemon(s)...
 *   No VPN is running.

But actually thousands of derelict OpenVPN processes are running, consuming 
resources on the server and consuming much bandwidth:
# ps ax |grep openvpn | wc -l
1045
# ps ax |grep openvpn | head
  303 ?        Ss     0:04 /usr/sbin/openvpn --writepid 
/var/run/openvpn.tun0-client.pid --daemon ovpn-tun0-client --status 
/var/run/openvpn.tun0-client.status 10 --cd /etc/openvpn --config 
/etc/openvpn/tun0-client.conf --script-security 2
  358 ?        Ss     0:03 /usr/sbin/openvpn --writepid 
/var/run/openvpn.tun0-client.pid --daemon ovpn-tun0-client --status 
/var/run/openvpn.tun0-client.status 10 --cd /etc/openvpn --config 
/etc/openvpn/tun0-client.conf --script-security 2
  410 ?        Ss     0:03 /usr/sbin/openvpn --writepid 
/var/run/openvpn.tun0-client.pid --daemon ovpn-tun0-client --status 
/var/run/openvpn.tun0-client.status 10 --cd /etc/openvpn --config 
/etc/openvpn/tun0-client.conf --script-security 2
[...]

These processes must be killed manually.

** Affects: openvpn (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1193878

Title:
  Init script loses track of openvpn processes sometimes

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openvpn/+bug/1193878/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to