[SOLVED] phantom processes

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Locked
johnmb
OpenVPN User
Posts: 24
Joined: Tue Oct 04, 2011 10:02 am

[SOLVED] phantom processes

Post by johnmb » Mon Oct 31, 2011 12:59 pm

Related to a previous issue had raised when I was having difficulty with the linux client, there is
a strange behaviour, that I can work around by manually killing processes, however it clearly
isn't correct behaviour.

At all times, the server behaves correctly; it is the behaviour of the linux client that is at issue.
I can start the client and the session starts correctly and I can use the session without problems.
Then I shut down the client session using CTRL C and the transcript of the client indicates that all has shut down correctly upon reception of the signal. Then I type:-

ps aux | grep openvpn

This shows me that there are no residual openvpn related processes left running; again what I expected.
Then I shut down the linux box (sudo shutdown -h now) and restart. When the linux box has fully restarted
back to my shell window command line, I again type "ps aux | grep openvpn" but this time I get the
following:-

root 2833 0.0 0.1 4532 2080 ? Ss 12:44 0:00 /usr/sbin/openvpn --writepid /var/run/openvpn.client.pid --daemon ovpn-client --status /var/run/openvpn.client.status 10 --cd /etc/openvpn --config /etc/openvpn/client.conf
root 2843 0.0 0.0 4532 1432 ? Ss 12:44 0:00 /usr/sbin/openvpn --writepid /var/run/openvpn.rclient.pid --daemon ovpn-rclient --status /var/run/openvpn.rclient.status 10 --cd /etc/openvpn --config /etc/openvpn/rclient.conf

Where did that come from ? If I try to open an OpenVPN session withlout killing these two processes,
the session fails to start properly and I can't see my remote LAN. I have to kill these two processes and then
the session will start OK.

Any ideas on this ?

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: phantom processes

Post by janjust » Mon Oct 31, 2011 1:31 pm

your linux distro seems to have an /etc/init.d/openvpn script which launches all files found in /etc/openvpn; right now you have two files, client.conf and rclient.conf

This is linux distro dependent, so have a look at the init.d scripts for details.

johnmb
OpenVPN User
Posts: 24
Joined: Tue Oct 04, 2011 10:02 am

Re: phantom processes

Post by johnmb » Mon Oct 31, 2011 4:52 pm

Thanks, you're right; if I type:-

sudo /etc/init.d/openvpn stop

then start the client - all works OK. I suppose it assumes that I want the server running
from system start when, in actual fact, I only ever want to run the client. I'll have to think
about the way I want to run openvpn for the future.

Thanks for your help

johnmb
OpenVPN User
Posts: 24
Joined: Tue Oct 04, 2011 10:02 am

Re: phantom processes

Post by johnmb » Mon Oct 31, 2011 4:54 pm

Beg your pardon - runs both clients from system start; as you said.

johnmb
OpenVPN User
Posts: 24
Joined: Tue Oct 04, 2011 10:02 am

Re: phantom processes

Post by johnmb » Tue Nov 01, 2011 9:35 am

I found the best way forward, rather than messing around with the startup script itself, was to place the client conf files in a subdirectory under /etc/openvpn rather than directly in that directory. This way the startup script doesn't see them and doesn't try to start them (I have one conf file to use within our building across the corporate network to openvpn and hence to the separate local sub-net and another for access from anywhere else on the internet). Also, any upgrade to OpenVPN that might re-instate the startup script doesn't cause a problem.

Thank you once again - problem solved

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: phantom processes

Post by janjust » Tue Nov 01, 2011 11:06 am

thanks for sharing your tips!
Closing topic

Locked