NetworkManager plugin NeedSecrets takes time to become operational after wake

Bug #2044572 reported by Mahmoud Al-Qudsi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
NetworkManager
New
Undecided
Unassigned
Ubuntu
Confirmed
Undecided
Unassigned

Bug Description

For fully and correctly operational NetworkManager VPN configuration(s) with no unresolved issues, misconfigurations, or connectivity/networking problems, there is a recurring problem (observed from 18.04 through 23.04) where the functionality of the NeedSecrets plugin (which stores saved-per-user credentials for a VPN connection/profile) is unavailable immediately following the wake of a PC from suspension.

After waiting "long enough" (more than a couple of minutes) and then retrying to use a NetworkManager profile with a saved per-user secret, the secret is correctly obtained allowing the connection to be established.

This seems to be dependent on the level of suspend; in my test case, merely hitting the power/suspend button on the device (an HP ZBook G3 Studio), waiting for the screen to go out, then re-waking the device does not trigger this behavior; however closing the lid of the device, letting it go into "full" suspension, then waking it some time later reliably reproduces this issue.

When the issue described presents, the following is logged to the system journal:

    Nov 24 12:37:17 ZBook NetworkManager[642]: <warn> [1700851037.6714] vpn[0x55b0c2acc7c0,109e3fe6-11a2-4587-bdfa-3071cb52fb36,"example.net"]: plugin NeedSecrets request #1 failed: Timeout was reached

With the default configuration, no other messages regarding NeedSecrets are logged to the system journal.

I took care to ensure the network was fully operational before attempting to establish the VPN connection via NetworkManager; full TCP/IP connectivity and DNS resolution was confirmed working before the VPN attempt was made and the NeedSecrets warning was logged.

As mentioned, this has been observed at least since 18.04 and currently against Ubuntu 23.04. The following network-manager packages/versions are installed:

* network-manager-config-connectivity-ubuntu/lunar,now 1.42.4-1ubuntu2 all [installed,automatic]
* network-manager-gnome/lunar,now 1.30.0-2ubuntu1 amd64 [installed,automatic]
* network-manager-l2tp-gnome/lunar,now 1.20.8-1 amd64 [installed]
* network-manager-l2tp/lunar,now 1.20.8-1 amd64 [installed,automatic]
* network-manager-openvpn-gnome/lunar,now 1.10.2-2 amd64 [installed]
* network-manager-openvpn/lunar,now 1.10.2-2 amd64 [installed]
* network-manager-pptp-gnome/lunar,now 1.2.12-1 amd64 [installed,automatic]
* network-manager-pptp/lunar,now 1.2.12-1 amd64 [installed,automatic]
* network-manager-strongswan/lunar,now 1.6.0-1 amd64 [installed]
* network-manager-vpnc-gnome/lunar,now 1.2.8-4 amd64 [installed]
* network-manager-vpnc/lunar,now 1.2.8-4 amd64 [installed]
* network-manager/lunar,now 1.42.4-1ubuntu2 amd64 [installed,automatic]

Revision history for this message
Mahmoud Al-Qudsi (mqudsi) wrote :

(I should clarify that when I say "since 18.04 and through 23.04" I am not referring to a single installation that has been upgraded; this is referring to multiple clean installations of various versions.)

affects: ubuntu → network-manager
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.