Package: openvpn
Followup-For: Bug #326080

I can reproduce this bug, but I'm a bit reluctant to provide config on a
public mailing list (I would be happy to mail it, with IP changes,
directly to a maintainer though)


ii  openvpn             2.0-1sarge2         Virtual Private Network


This happens for me when I have:

  # cat /etc/default/openvpn 
  AUTOSTART="none"

But I have a particular network I want to start:

  $ sudo /etc/init.d/openvpn start xxxx
  Starting virtual private network daemon:Enter Auth Username:xxxx
  Enter Auth Password:
   xxxx.

  $ sudo /etc/init.d/openvpn start xxxx
  Starting virtual private network daemon:Enter Auth Username:xxxx
  Enter Auth Password:
   xxxx.

It is now running twice:

  # ps -ef | grep open
  nobody   15780     1  1 13:55 ?        00:00:09 /usr/sbin/openvpn...
  nobody   17499     1  2 13:59 ?        00:00:06 /usr/sbin/openvpn...

  # ip route
  ...
  10.100.0.0/16 dev tap0  proto kernel  scope link  src 10.100.0.156 
  10.100.0.0/16 dev tap1  proto kernel  scope link  src 10.100.0.156 

The PID file shows only the second instance, as if the first had now
been forgotten about:

  # cat /var/run/openvpn.xxxx.pid 
  17499

I can stop the second instance, but not the first:

  $ sudo /etc/init.d/openvpn stop xxxx
  Stopping virtual private network daemon: xxxx.
  
  # cat /var/run/openvpn.xxxx.pid 
  cat: /var/run/openvpn.xxxx.pid: No such file or directory
  
  $ sudo /etc/init.d/openvpn stop xxxx
  Stopping virtual private network daemon: (failure: No such VPN is
  running: xxxx).
  
Still the first instance is running;

  ps -ef | grep open
  nobody   15780     1  1 13:55 ?        00:00:13 /usr/sbin/openvpn...

  # ip route
  ...
  10.100.0.0/16 dev tap0  proto kernel  scope link  src 10.100.0.156 


I suspect a simple fix here would be to get the "start" action to detect
a PID file, and politely refuse to start again if the PID file is there
- perhaps with some liveness checking to see if the process really
exists, in case of stale PID files from a previous crash.


Hope that helps,

-- 

Paul "LeoNerd" Evans

[EMAIL PROTECTED]
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to