Ubuntu 9.10: network-manager – openvpn – “vpn service failed to start”
Any ideas
?
Updated 2009.12.25
![]()
So this is quite frustrating:
Background:
In Ubuntu 9.04 I had a VPN connection configured in order to use Witopia. It worked.
Under Ubuntu 9.04 I used these instructions to set everything up.
I upgraded to Ubuntu 9.10 and now it doesn't work.
Problem:
In Network Manager, under VPN Connections, when I select my "openvpn" connection I get this error message:
The vpn connection 'openvpn' failed because the VPN service failed to start.
More Info:
Here is what it says in Sys Log:
(notice what I have highlighted in red)
Nov 7 21:05:21 ubuntu-laptop NetworkManager: <info> Starting VPN service 'org.freedesktop.NetworkManager.openvpn'...
Nov 7 21:05:21 ubuntu-laptop NetworkManager: <info> VPN service 'org.freedesktop.NetworkManager.openvpn' started (org.freedesktop.NetworkManager.openvpn), PID 1974
Nov 7 21:05:22 ubuntu-laptop NetworkManager: <info> VPN service 'org.freedesktop.NetworkManager.openvpn' just appeared, activating connections
Nov 7 21:05:22 ubuntu-laptop NetworkManager: <info> VPN plugin state changed: 1
Nov 7 21:05:22 ubuntu-laptop NetworkManager: <info> VPN plugin state changed: 3
Nov 7 21:05:22 ubuntu-laptop NetworkManager: <info> VPN connection 'openvpn' (Connect) reply received.
Nov 7 21:05:22 ubuntu-laptop NetworkManager: <WARN> nm_vpn_connection_connect_cb(): VPN connection 'openvpn' failed to connect: 'No VPN secrets!'.
Nov 7 21:05:22 ubuntu-laptop NetworkManager: <WARN> connection_state_changed(): Could not process the request because no VPN connection was active.
Nov 7 21:05:22 ubuntu-laptop NetworkManager: <info> Policy set 'Auto eth0' (eth0) as default for routing and DNS.
Nov 7 21:05:35 ubuntu-laptop NetworkManager: <debug> [1257624335.001600] ensure_killed(): waiting for vpn service pid 1974 to exit
Nov 7 21:05:35 ubuntu-laptop NetworkManager: <debug> [1257624335.001766] ensure_killed(): vpn service pid 1974 cleaned up
Nov 7 21:05:40 ubuntu-laptop NetworkManager: <info> Starting VPN service 'org.freedesktop.NetworkManager.openvpn'...
Nov 7 21:05:40 ubuntu-laptop NetworkManager: <info> VPN service 'org.freedesktop.NetworkManager.openvpn' started (org.freedesktop.NetworkManager.openvpn), PID 1978
Nov 7 21:05:40 ubuntu-laptop NetworkManager: <info> VPN service 'org.freedesktop.NetworkManager.openvpn' just appeared, activating connections
Nov 7 21:05:40 ubuntu-laptop NetworkManager: <info> VPN plugin state changed: 3
Nov 7 21:05:40 ubuntu-laptop NetworkManager: <info> VPN connection 'openvpn' (Connect) reply received.
Nov 7 21:05:40 ubuntu-laptop NetworkManager: <WARN> nm_vpn_connection_connect_cb(): VPN connection 'openvpn' failed to connect: 'No VPN secrets!'.
Nov 7 21:05:40 ubuntu-laptop NetworkManager: <WARN> connection_state_changed(): Could not process the request because no VPN connection was active.
Nov 7 21:05:40 ubuntu-laptop NetworkManager: <info> Policy set 'Auto eth0' (eth0) as default for routing and DNS.
Nov 7 21:05:53 ubuntu-laptop NetworkManager: <debug> [1257624353.002543] ensure_killed(): waiting for vpn service pid 1978 to exit
Nov 7 21:05:53 ubuntu-laptop NetworkManager: <debug> [1257624353.002711] ensure_killed(): vpn service pid 1978 cleaned up
What I have tried so far:
Reading through the Ubuntu forums, and searching Google, it seems many people are having this problem. It also doesn't appear to be a new problem (although I did not experience it in Ubuntu 9.04).
I tried to remove openvpn and network-manage-openvpn packages and to add them again and to create new connection profiles.
Unfortunately without success.
Any ideas?
Update:
Apparently the following method has worked for some, can anyone confirm?
- In the VPN settings, uncheck the option "Available to all users"
- Enable MPPE
Doing so will apparently solve the issue. I have not yet tested this.
Update 2009.12.09:
The proposed fix did not work for me.
At this moment in time, I am of the assumption that this problem is occurring mainly on machines that had a previous VPN set up and were then updated?
Update 2009.12.25:
Two new solutions have been proposed. Before you try them consider these points to see which option is better: Solution 1 allows network manager to use pptp encryption, this is a little less secure than ssl. So I would recommend that you try Solution 2 first, if that doesn't work for you, undo the changes and try Solution 1.
Solution 1:
Install the package network-manager-pptp
The command would be: sudo apt-get install network-manager-pptp
Then it should work as has been reported in the comments section.
Solution 2:
Edit your /etc/network/interfaces file.
Change it from this:
auto lo
iface lo inet loopback
To this:
auto eth0
iface eth0 inet dhcp
This has also been reported to work for some.
December 21st, 2009 - 13:30
Same problem,
solution : install http://apt.ubuntu.com/p/network-manager-pptp
works now very well.
rg
sysbt
December 22nd, 2009 - 14:11
Same problem : but ok in a terminal : /etc/openvpn –config client.conf or with kvpnc
December 23rd, 2009 - 08:38
Had the same problem and sysbt’s solution worked perfectly for me. Thanx!
Now I can finally work from home without all that ssh tunnelling business.
December 23rd, 2009 - 08:41
As for the post Update 2009.12.09 i can’t confim this. I made a fresh install on a brand new flash disk and still had the problem but it is now fixed as you can see on the post above.
December 25th, 2009 - 18:21
Solved for me!! – for wired network card…
installed file – /etc/network/interfaces – looks like this….
auto lo
iface lo inet loopback
edit – /etc/network/interfaces – to look like this…
auto eth0
iface eth0 inet dhcp
December 25th, 2009 - 19:14
Thanks very much all for the feedback, keep it coming as loads of people are checking this post out, evidently many Ubuntu 9.10 users are experiencing this issue.
I have updated the post to include the solutions mentioned in the comments. Hope they help others.
January 1st, 2010 - 22:00
I have same problem.
I want to use openvpn via wlan0 adapter (eth0 is not connected).
I changed /etc/network/interfaces (instead of etho wlan0) – but it do not work!
network-manager-pptp also not works!
January 1st, 2010 - 22:35
here the syslog-output
Jan 1 22:30:56 Laptop NetworkManager: Starting VPN service ‘org.freedesktop.NetworkManager.openvpn’…
Jan 1 22:30:56 Laptop NetworkManager: VPN service ‘org.freedesktop.NetworkManager.openvpn’ started (org.freedesktop.NetworkManager.openvpn), PID 2420
Jan 1 22:30:56 Laptop NetworkManager: VPN service ‘org.freedesktop.NetworkManager.openvpn’ just appeared, activating connections
Jan 1 22:30:56 Laptop NetworkManager: VPN plugin state changed: 1
Jan 1 22:30:56 Laptop NetworkManager: VPN plugin state changed: 3
Jan 1 22:30:56 Laptop NetworkManager: VPN connection ‘c’ (Connect) reply received.
Jan 1 22:30:56 Laptop NetworkManager: nm_vpn_connection_connect_cb(): VPN connection ‘c’ failed to connect: ‘No VPN secrets!’.
Jan 1 22:30:56 Laptop NetworkManager: connection_state_changed(): Could not process the request because no VPN connection was active.
Jan 1 22:30:56 Laptop NetworkManager: (wlan0): writing resolv.conf to /sbin/resolvconf
Jan 1 22:30:56 Laptop NetworkManager: Policy set ‘Auto my_wireless_network’ (wlan0) as default for routing and DNS.
January 2nd, 2010 - 23:32
Ok, if the private keyfile is not password protected this bug exists. But sometime he connected without set password (one of one hundred tries). Then I set a private password and now it always connect without problems. Strange because via console or with Windows OpenVPN GUI it also connects when private keyfile has no password.
Dummy bug in network-manager! Hope, this will be fixed soon!
January 11th, 2010 - 10:59
Try a reboot. I had this exact problem ‘No VPN secrets’ with a clean install of Ubuntu 9.10. After reboot the keyring then started to work.
Also edit your vpn connection to ensure it has the password after reboot.
Now works perfectly for me.
January 19th, 2010 - 15:33
I had the same problem as described in the first post. I’m running Ubuntu 9.10. The post from Mike Tonks did the trick. After a reboot whilst having a pptp vpn connection with saved passwords configured, it worked.
So just add your gateway, username and password. Hit the advanced button and allow the authentication methods for your specific vpn server. (Mine are only CHAP, MSCHAP and MSCHAPv2 checked) Furthermore the default options worked with my connection (Allow BSD… Allow Deflate… Use TCP… checked) and have MPPE disabled.
February 4th, 2010 - 10:09
The fix for me was to simply enter a “Private Key Password” for the key to be used, even though the key isn’t encrypted with a passphrase.
This bug has been annoying me for ages (I was working around by using the command line client) – finally decided to try and fix it today; I had two VPN connections configured – one would always connect without fail, the other was completely intermittent – even on the odd occasion when it managed to connect successfully it would disconnect within a few minutes.
After reading all of the comments above, it occurred to me that as Mike Tonks mentioned, the stable connection had a password encrypted key and the other didn’t.
February 14th, 2010 - 20:24
None of these fixes work for me. I’ve confirmed that a fake password on the key does not do anything. I’m betting the person who posted that it did, just happened to get one of the few times it would randomly connect.
I also tried the editing of interfaces (but please don’t remove the entries already there as he suggests! You need the lo entry!) but it did nothing as well – perhaps only because I use wireless (as do most people using VPN clients from their laptops) and not eth0.
The only thing I have not done yet is create a new vpn keyset that uses a password.
February 16th, 2010 - 04:40
None of the solutions posted here are working for me. I think its a permissions issue, but not sure how to solve it. I enabled root and logged in then imported my OVPN config file and it connected successfully. However when logging in via my user account I still received the same service failed to start error. I tried changing the permissions to /usr/sbin/service but still no luck. Any ideas what logs I might check to track down where the actual issu resides?
February 17th, 2010 - 20:34
I have been having the same problem sinse 9.04
I am now running 9.10 and fiddling around have discovered that the following function fixes the problem If you run.:
sudo service openvpn restart
I can connect to my work VPN.
This is more than likely due to the vpn service either not starting on bootup or starting before a required service.
I haven’t got round to checking this though, but when I do I will look into my /etc/rc.local (and related) directories to see boot orders.
I hope this provides some help!
Stewart
April 3rd, 2010 - 20:22
I found that this was a problem because my Gnome keyring did not have a password. When I deleted the file ~/.gnome2/keyrings/default* (really moved them somewhere else) and recreated my Gnome keyring with a password, then I was able to make a VPN connection with no problem
May 20th, 2010 - 02:09
I couldn’t get this working. I fixed it (w/ Ubuntu 9.10) from :
- Unchecking the option “Available to all users”
- Enabling MPPE
- Check the option “Connect automatically”
Hope this helps.
July 7th, 2010 - 21:50
I am on 10.4 using Witopia for a provider. The item from Russell Ianniello worked for me. Thanks Russell.