NetworkManager forgets my VPN settings until I reboot
When I log out and log back in, sometimes NetworkManager forgets my VPN settings - nm-applet shows the wifi connection as normal (and it works) but click on it and "VPN Connections" offers only "Configure VPN" or "Disconnect VPN". It fails to show the VPN that normally lives there.
The only way I've found to get it back to normal is to reboot - and then it's fine until I log out again. Any ideas? I'm on Fedora 22 with i3 window manager. |
Can you not simply disconnect and the reconnect again? I occasionally have my work PPTP VPN session break, and I'm forced to reconnect again. I've never bothered to monitor the connection, but one could with monitor NetworkManager like this
Code:
sudo journalctl -fu NetworkManager BTW, instead of rebooting, try restarting NetworkManager like this Code:
sudo systemctl restart NetworkManager |
Hmm, I should have mentioned that I tried that - it doesn't help. Nor does 'pkill nm-applet; nm-applet&'
|
Well, I wouldn't expect killing the nm-applet to work since it's just the front-end to NetworkManager, and it's the underlying network layer that needs to be restarted.
When I log out (KDE 4.14.18, openSUSE Leap) and then log back in my VPN connection is terminated, but this is what I would have expected anyway since it is not defined as a 'system' connection, but as a 'user' connection only. However, it does let me restart it without issue. I assume from your reference to 'nm-appet' that you're a Gnome user, and I wonder if Gnome is configured to remember sessions, and whether this influences the behaviour here. I think the 'gnome-tweak-tool' can be used to configure this? |
Quote:
https://faq.i3wm.org/question/2/how-...-i3/index.html |
that link led me to look at ck-list-sessions:
<quote> Also note that you need to have a proper ConsoleKit session running to be authorized to use NetworkManager. You can verify that using ck-list-sessions | grep is-local which should print is-local = TRUE. In case you see FALSE there, use a display manager like gdm to login and start i3. It will not work with xdm currently (as of 2012-06-04), unless you use a patched version. </quote> ck-list-sessions returns nothing for me (but NM is working presently). I don't know if it's a furphy or something I need to worry about. i3 is pretty minimalist so I supply dbus from my .xinitrc file - so many things to worry about these days - consolekit, policykit, dbus ... and very little doco to go with them. It's just odd that it works in the first session after booting but forgets my VPN names when I restart X |
Quote:
|
nmcli is in the same position - it looks like it's NM itself which has lost track of the VPN.
|
Ah, so not listed by the following after logging back in?
Code:
nmcli con |
nmcli is also unable to raise the VPN although it does see it:
Code:
4 20:58 achar:~/ $ nmcli con |
Oh that's interesting - something just timed out, I got a notify-send message saying the connection failed and now I can connect again with nm-applet!!!
Now I'm getting somewhere with this - maybe I can force it _down_ with nmcli instead of trying to get it up. |
Of course, I can't get the thing to fail now ... no matter how I log out and log in ...
|
Finally it failed again:
0 08:47 achar:~/ $ nmcli con NAME UUID TYPE DEVICE Beltsy aac37b3d-8b97-43c6-ad06-b494db7578b6 802-11-wireless wlp3s0 ... so no sign of my other access points or my VPN ... I tried 'systemctl restart NetworkManager' but it didn't help ... no sign of the timeout event that reset things on 9th Weirder and weirder ... although nmcli doesn't report anything but 'Beltsy', nm-applet reports my second access point 'Moldova' but not the VPN. When I try to connect to 'Moldova' I get a popup error: Failed to add/activate connection (32) No session found for uid 1545 (unknown) (uid 1545 is me) |
What does the following show when the connections are missing?
Code:
nmcli dev |
Quote:
This might be useful... Code:
loginctl list-sessions Code:
sudo nmcli con |
All times are GMT -5. The time now is 03:04 AM. |