LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-08-2016, 07:41 AM   #1
bhepple
LQ Newbie
 
Registered: Mar 2004
Location: Brisbane, Queensland, Australia
Distribution: fedora
Posts: 19

Rep: Reputation: 0
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.
 
Old 04-08-2016, 11:57 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
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
That should help you capture what is occurring with the VPN session.

BTW, instead of rebooting, try restarting NetworkManager like this
Code:
sudo systemctl restart NetworkManager
 
Old 04-09-2016, 03:18 AM   #3
bhepple
LQ Newbie
 
Registered: Mar 2004
Location: Brisbane, Queensland, Australia
Distribution: fedora
Posts: 19

Original Poster
Rep: Reputation: 0
Hmm, I should have mentioned that I tried that - it doesn't help. Nor does 'pkill nm-applet; nm-applet&'
 
Old 04-09-2016, 03:42 AM   #4
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
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?
 
Old 04-09-2016, 03:57 AM   #5
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
I'm on Fedora 22 with i3 window manager.
I missed this before, and I'm not familiar with i3. I did find this which may or may not be relevant...

https://faq.i3wm.org/question/2/how-...-i3/index.html
 
Old 04-09-2016, 04:11 AM   #6
bhepple
LQ Newbie
 
Registered: Mar 2004
Location: Brisbane, Queensland, Australia
Distribution: fedora
Posts: 19

Original Poster
Rep: Reputation: 0
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
 
Old 04-09-2016, 04:26 AM   #7
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
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
I can understand that it is a little annoying with it's behaviour in your i3 environment. I guess you could consider using NetworkManager's CLI interfaces (nmcli or nmtui) to control the connectivity instead, and I note that the page I linked to also suggests 'netctl' as another option.
 
Old 04-09-2016, 05:31 AM   #8
bhepple
LQ Newbie
 
Registered: Mar 2004
Location: Brisbane, Queensland, Australia
Distribution: fedora
Posts: 19

Original Poster
Rep: Reputation: 0
nmcli is in the same position - it looks like it's NM itself which has lost track of the VPN.
 
Old 04-09-2016, 05:39 AM   #9
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Ah, so not listed by the following after logging back in?
Code:
nmcli con
 
Old 04-09-2016, 06:02 AM   #10
bhepple
LQ Newbie
 
Registered: Mar 2004
Location: Brisbane, Queensland, Australia
Distribution: fedora
Posts: 19

Original Poster
Rep: Reputation: 0
nmcli is also unable to raise the VPN although it does see it:
Code:
4 20:58 achar:~/ $ nmcli con
NAME            UUID                                  TYPE             DEVICE 
ClubMotelWAP2   ad458fde-b563-44de-92d8-eebc5462226a  802-11-wireless  --     
Moldova         b3486ebf-7a48-43a7-992a-367e32ac56fe  802-11-wireless  --     
Anchors         d16a2574-d4f0-417c-b813-c7a802094388  802-11-wireless  --     
OPTUSVD3516090  e4950cd6-d5df-406f-a7ee-819005a4807c  802-11-wireless  --     
OPTUSVD39E6F00  fc5df664-8b70-4460-bc3a-b752d799eaeb  802-11-wireless  --     
NETGEAR38       bab09c5d-e84c-46d0-bb7d-29dbd07ebd45  802-11-wireless  --     
Beltsy 1        f6a4ad9e-0d1b-4eed-9780-e399d5710ee2  802-11-wireless  --     
NETGEAR28       d5607a2a-6692-427d-9b60-707a3f6c06af  802-11-wireless  --     
Jacara105S      e1720742-0450-4f85-a9a9-566d7bc8d416  802-11-wireless  --     
belkin.14e      8db02e62-cf37-4ddb-8887-f28059a34e5d  802-11-wireless  --     
Beltsy          aac37b3d-8b97-43c6-ad06-b494db7578b6  802-11-wireless  wlp3s0 
SG-A1401210807  859f817a-170f-4c4e-af58-69f9587720b9  802-11-wireless  --     
OPTUSVD337BBF0  31b52bff-6823-4261-9bb8-11dd8a7073a4  802-11-wireless  --     
Garry123        82293e63-54b6-4c12-8291-819035eb564b  802-11-wireless  --     
Moldova_2GEXT   66c5693c-0c25-4cb8-b713-c8b63e23725c  802-11-wireless  --     
p5p1            752690a4-3409-4269-8a32-37eed956f54e  802-3-ethernet   --     
Baroona         4a1fd9d9-5dde-46f5-ba37-2ebbd70be161  802-11-wireless  --     
NETGEAR         af17c026-40e2-4ca2-8af7-1c7d76824c93  802-11-wireless  --     
TP-LINK_E0C8D8  9a74d837-bdf4-4f5c-bf63-5436b59dd060  802-11-wireless  --     
OPTUSVD3BDB319  6c84e15c-e067-40e1-b67b-c788a1d81423  802-11-wireless  --     
Emcorp          37cc4235-3680-498d-981d-ac9265cb0a67  802-11-wireless  --     
FLINDERS_CAFE   0d67ac2e-67ab-4878-9767-be5f20f35018  802-11-wireless  --     
tun0            c3983f04-8ba0-452b-b0be-c4074b43fc35  generic          tun0   
TNS             d040a0b3-138a-42f1-8736-27093be8e226  vpn              wlp3s0 
belkin.14e 1    03bae80d-420d-4000-8b00-f19eff59c9f9  802-11-wireless  --     
0 20:58 achar:~/ $ nmcli con up TNS
Error: Connection activation failed: Connection 'TNS' is already active
4 20:59 achar:~/ $ ping tns
PING bhepple.win2k.corp.tnsi.com (xxx.xxx.xxx.xxx) 56(84) bytes of data.
^C
--- bhepple.win2k.corp.tnsi.com ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 3999ms

Last edited by bhepple; 04-09-2016 at 06:13 AM.
 
Old 04-09-2016, 06:12 AM   #11
bhepple
LQ Newbie
 
Registered: Mar 2004
Location: Brisbane, Queensland, Australia
Distribution: fedora
Posts: 19

Original Poster
Rep: Reputation: 0
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.
 
Old 04-09-2016, 06:23 AM   #12
bhepple
LQ Newbie
 
Registered: Mar 2004
Location: Brisbane, Queensland, Australia
Distribution: fedora
Posts: 19

Original Poster
Rep: Reputation: 0
Of course, I can't get the thing to fail now ... no matter how I log out and log in ...
 
Old 04-12-2016, 05:51 PM   #13
bhepple
LQ Newbie
 
Registered: Mar 2004
Location: Brisbane, Queensland, Australia
Distribution: fedora
Posts: 19

Original Poster
Rep: Reputation: 0
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)

Last edited by bhepple; 04-12-2016 at 05:59 PM.
 
Old 04-12-2016, 05:59 PM   #14
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
What does the following show when the connections are missing?
Code:
nmcli dev
 
Old 04-12-2016, 06:28 PM   #15
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
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)
That is an interesting finding. Some Gnome-related regression perhaps?

This might be useful...
Code:
loginctl list-sessions
loginctl session-status 1545
If it's a session-related issue, then next time it fails check nmci as root.
Code:
sudo nmcli con
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
KMail forgets settings (Kubuntu 10.04) ph73nt Ubuntu 4 11-27-2010 06:39 PM
ubuntu 7.10 laptop forgets network settings on reboot/suspend/logout fullout-blaine Linux - Networking 3 04-01-2008 05:05 PM
Fedore Core 7 Forgets Its DNS Settings on Reboot kaplan71 Linux - Networking 4 11-30-2007 10:01 AM
SuSe 10 forgets DNS settings on reboot IglooGuy SUSE / openSUSE 1 01-06-2006 02:45 PM
Mandrake Forgets Connection Settings JimH Linux - Software 3 01-19-2002 05:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration