network-manager-openconnect can’t prompt for passwords

Bug #824255 reported by Anders Kaseorg
94
This bug affects 21 people
Affects Status Importance Assigned to Milestone
network-manager-openconnect (Ubuntu)
Fix Released
Undecided
Unassigned
network-manager-pptp (Ubuntu)
Fix Released
Undecided
Unassigned
network-manager-vpnc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Activating an openconnect VPN fails silently. This goes to syslog:

Aug 10 21:01:24 fixed-disk NetworkManager[27695]: <info> Starting VPN service 'openconnect'...
Aug 10 21:01:24 fixed-disk NetworkManager[27695]: <info> VPN service 'openconnect' started (org.freedesktop.NetworkManager.openconnect), PID 27842
Aug 10 21:01:24 fixed-disk NetworkManager[27695]: <info> VPN service 'openconnect' appeared; activating connections
Aug 10 21:01:24 fixed-disk NetworkManager[27695]: <info> VPN plugin state changed: 1
Aug 10 21:01:24 fixed-disk NetworkManager[27695]: <error> [1313024484.634493] [nm-vpn-connection.c:882] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.

I’m sure part of the problem is that network-manager-openconnect-gnome is missing /usr/lib/network-manager-openconnect/nm-openconnect-auth-dialog (which is built and installed but not packaged), but installing it by hand didn’t seem to help.

Changed in network-manager-openconnect (Ubuntu):
status: New → Confirmed
Revision history for this message
Mingming Ren (portis25) wrote :

These three files
nm-openconnect-auth-dialog
nm-openconnect-service
nm-openconnect-service-openconnect-helper
are placed in a wrong path which should be /usr/lib/NetworkManger instead of /usr/lib/network-manager-openconnect/

Revision history for this message
Joe Wrigley (joe-zwn) wrote :

On my system, after upgrading from Natty to Oneiric, network-manager-openconnect silently failed to show the authentication dialog.

Running NetworkManager with:

NM_SERIAL_DEBUG=1 NetworkManager --no-daemon 2>&1 | tee /tmp/nm-serial.txt

Showed:

NetworkManager[4964]: <info> VPN service 'openconnect' started (org.freedesktop.NetworkManager.openconnect), PID 5030
NetworkManager[4964]: <info> VPN service 'openconnect' appeared; activating connections
NetworkManager[4964]: <info> VPN plugin state changed: 1
NetworkManager[4964]: <error> [1315223479.717561] [nm-vpn-connection.c:882] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.
NetworkManager[4964]: <info> Policy set 'Auto Bebox342353' (wlan0) as default for IPv4 routing and DNS.
NetworkManager[4964]: <info> VPN service 'openconnect' disappeared

I found this bug, and discovered I had no nm-openconnect-auth-dialog in /usr/lib/network-manager-openconnect OR in /usr/lib/NetworkManager.

I rebuilt the package and copied debian/tmp/usr/lib/network-manager-openconnect/nm-openconnect-auth-dialog to /usr/lib/NetworkManager and it now works. Looks like a packaging error.

Revision history for this message
Anders Kaseorg (andersk) wrote :

Good call! This patch fixes the problem for me.

Anders Kaseorg (andersk)
tags: added: patch regression-release
Revision history for this message
Colin Watson (cjwatson) wrote :

Thanks! Looks sensible; I'll upload that shortly.

Revision history for this message
Colin Watson (cjwatson) wrote :

Also, please propose this as a merge into ~network-manager/network-manager/openconnect-ubuntu.head to get the VCS in sync; I can't push to that directly myself.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package network-manager-openconnect - 0.8.999-0ubuntu3

---------------
network-manager-openconnect (0.8.999-0ubuntu3) oneiric; urgency=low

  * Fix prompting for VPN password. (LP: #824255)
    - Add nm-openconnect-auth-dialog to network-manager-openconnect-gnome.
    - Install nm-openconnect-auth-dialog, nm-openconnect-service, and
      nm-openconnect-service-openconnect-helper in /usr/lib/NetworkManager
      instead of /usr/lib/network-manager-openconnect.
 -- Anders Kaseorg <email address hidden> Tue, 06 Sep 2011 15:01:16 -0400

Changed in network-manager-openconnect (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Anders Kaseorg (andersk) wrote :
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Thanks! Merged the branch now.

Revision history for this message
M0ses (m0ses) wrote :
Download full text (3.8 KiB)

seems like the bugfix was kicked out in network-manager 0.9.1

####
Sep 30 09:03:08 fs-e4310 NetworkManager[961]: <info> VPN service 'vpnc' started (org.freedesktop.NetworkManager.vpnc), PID 2359
Sep 30 09:03:08 fs-e4310 NetworkManager[961]: <info> VPN service 'vpnc' appeared; activating connections
Sep 30 09:03:08 fs-e4310 NetworkManager[961]: <info> VPN plugin state changed: 1
Sep 30 09:03:08 fs-e4310 NetworkManager[961]: <error> [1317366188.589295] [nm-vpn-connection.c:882] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.
Sep 30 09:03:08 fs-e4310 NetworkManager[961]: <info> Policy set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS.
#####

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=========================================================================-=========================================================================-==================================================================================================================================================================
ii network-manager 0.9.1.90-0ubuntu2 network management framework (daemon and userspace tools)
ii network-manager-gnome 0.9.1.90-0ubuntu4 network management framework (GNOME frontend)
un network-manager-kde <none> (no description available)
ii network-manager-openvpn 0.9.0-0ubuntu1 network management framework (OpenVPN plugin core)
ii network-manager-openvpn-gnome 0.9.0-0ubuntu1 network management framework (OpenVPN plugin GNOME GUI)
un network-manager-openvpn-kde <none> (no description available)
ii network-manager-pptp 0.9.0-0ubuntu2 network management framework (PPTP plugin core)
ii network-manager-pptp-gnome 0.9.0-0ubuntu2 network management framework (PPTP plugin GNOME GUI)
un network-manager-pptp-kde <none> (no description available)
un network-manager-strongswan-kde ...

Read more...

Revision history for this message
David Ramalho (dramalho-gmail) wrote :

Yes, I'm hitting this again in 11.10 beta (and it's recent, two or three days old I figure)

Sep 30 11:08:44 dramalho-desktop NetworkManager[913]: <info> Starting VPN service 'pptp'...
Sep 30 11:08:44 dramalho-desktop NetworkManager[913]: <info> VPN service 'pptp' started (org.freedesktop.NetworkManager.pptp), PID 4005
Sep 30 11:08:44 dramalho-desktop NetworkManager[913]: <info> VPN service 'pptp' appeared; activating connections
Sep 30 11:08:44 dramalho-desktop NetworkManager[913]: <info> VPN plugin state changed: 1
Sep 30 11:08:44 dramalho-desktop NetworkManager[913]: <error> [1317377324.600940] [nm-vpn-connection.c:882] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.
Sep 30 11:08:44 dramalho-desktop NetworkManager[913]: <info> Policy set 'Auto Ethernet' (eth0) as default for IPv4 routing and DNS.
Sep 30 11:08:49 dramalho-desktop NetworkManager[913]: <info> VPN service 'pptp' disappeared

--

Should a separate bug report be issued?

Revision history for this message
dwmw2 (dwmw2) wrote :

It looks like the last two comments are a similar bug affecting pptp or vpnc connections, not openconnect?

Revision history for this message
computorist (travis-hume) wrote :

Yes, I'm having issues with vpnc.

Revision history for this message
FlashBuster (flashbuster) wrote :

I'm having this problem with PPTP since a few days :(

Oct 4 13:52:45 Fry NetworkManager[1151]: <info> Starting VPN service 'pptp'...
Oct 4 13:52:45 Fry NetworkManager[1151]: <info> VPN service 'pptp' started (org.freedesktop.NetworkManager.pptp), PID 14366
Oct 4 13:52:45 Fry NetworkManager[1151]: <info> VPN service 'pptp' appeared; activating connections
Oct 4 13:52:45 Fry NetworkManager[1151]: <error> [1317729165.708949] [nm-vpn-connection.c:882] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.
Oct 4 13:52:45 Fry NetworkManager[1151]: <info> Policy set 'Auto-Ethernet' (eth0) as default for IPv4 routing and DNS.
Oct 4 13:52:50 Fry NetworkManager[1151]: <info> VPN service 'pptp' disappeared

Revision history for this message
FlashBuster (flashbuster) wrote :

HA!

According to https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=742845
nm-applet "crashes" and causes this problem..

I started nm-applet in a console and connected in gnome-shell and it worked!

Revision history for this message
M0ses (m0ses) wrote :
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Right, this is fixed for all vpn plugins, as per bug 863120; with the upload of:
https://launchpad.net/ubuntu/+source/network-manager-applet/0.9.1.90-0ubuntu5

Closing as fix released.

Changed in network-manager-pptp (Ubuntu):
status: New → Fix Released
Changed in network-manager-vpnc (Ubuntu):
status: New → Fix Released
Revision history for this message
Nikolaus Waxweiler (madleser) wrote :

Still happens here. I'm using the dispatcher script from http://wiki.ubuntuusers.de/NetworkManager/Dispatcher, at the bottom (when I connect to a specific WLAN network, I automatically want to establish a VPN connection). Here's waht happens when I connect to the WLAN network specified in the dispatcher script:

Oct 24 00:18:34 nikolaus-desktop NetworkManager[1040]: <info> Policy set 'WLAN_NETWORK' (wlan0) as default for IPv4 routing and DNS.
Oct 24 00:18:34 nikolaus-desktop NetworkManager[1040]: <info> Activation (wlan0) successful, device activated.
Oct 24 00:18:34 nikolaus-desktop NetworkManager[1040]: <info> Activation (wlan0) Stage 5 of 5 (IP Configure Commit) complete.
Oct 24 00:18:34 nikolaus-desktop NetworkManager[1040]: <info> Activation (wlan0) Stage 4 of 5 (IP4 Configure Get) complete.
Oct 24 00:18:34 nikolaus-desktop NetworkManager[1040]: <info> VPN service 'pptp' disappeared
Oct 24 00:18:35 nikolaus-desktop NetworkManager[1040]: <info> Starting VPN service 'pptp'...
Oct 24 00:18:35 nikolaus-desktop NetworkManager[1040]: <info> VPN service 'pptp' started (org.freedesktop.NetworkManager.pptp), PID 5071
Oct 24 00:18:35 nikolaus-desktop NetworkManager[1040]: <info> VPN service 'pptp' appeared; activating connections
Oct 24 00:18:35 nikolaus-desktop NetworkManager[1040]: <error> [1319408315.274270] [nm-vpn-connection.c:882] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.
Oct 24 00:18:35 nikolaus-desktop NetworkManager[1040]: <info> Policy set 'WLAN_NETWORK' (wlan0) as default for IPv4 routing and DNS.
Oct 24 00:18:35 nikolaus-desktop nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/20-WLAN_NETWORK' exited with error status 4.
Oct 24 00:18:40 nikolaus-desktop NetworkManager[1040]: <info> VPN service 'pptp' disappeared
Oct 24 00:18:43 nikolaus-desktop kernel: [22918.977526] wlan0: no IPv6 routers present

Revision history for this message
marcb_ro (marcb-ro) wrote :

I don't know if I should file this as a separate bug, but I'm having the same issues with network-manager-openvpn (I'm running Ubuntu 11.10 amd64).

I'm trying to auto-connect to my VPN from /etc/NetworkManager/dispatcher.d/01ifupdown, but I get:

Nov 16 14:52:01 marc-U52F NetworkManager[7344]: <info> Starting VPN service 'openvpn'...
Nov 16 14:52:01 marc-U52F NetworkManager[7344]: <info> VPN service 'openvpn' started (org.freedesktop.NetworkManager.openvpn), PID 8760
Nov 16 14:52:01 marc-U52F NetworkManager[7344]: <info> VPN service 'openvpn' appeared; activating connections
Nov 16 14:52:01 marc-U52F NetworkManager[7344]: <info> VPN plugin state changed: 1
Nov 16 14:52:01 marc-U52F NetworkManager[7344]: <error> [1321451521.773163] [nm-vpn-connection.c:882] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.
Nov 16 14:52:01 marc-U52F NetworkManager[7344]: <info> Policy set '---edited---' (wlan0) as default for IPv4 routing and DNS.
Nov 16 14:52:01 marc-U52F nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/01ifupdown' exited with error status 4.
Nov 16 14:52:06 marc-U52F NetworkManager[7344]: <info> VPN service 'openvpn' disappeared

My package versions are:

network-manager: Installed: 0.9.1.90-0ubuntu5
network-manager-gnome: Installed: 0.9.1.90-0ubuntu6
network-manager-openvpn: Installed: 0.9.0-0ubuntu1
network-manager-openvpn-gnome: Installed: 0.9.0-0ubuntu1

Revision history for this message
Leonid Evdokimov (darkk) wrote :

I've written following script to connect to OpenVPN. There was one quirck in my setup, nmcli needed access to nm-applet, another trouble was router reboot: router sets up WLAN long before it connects to internet, so I added ping-check.

You can grab my script at https://github.com/darkk/home/blob/master/bin/nm-vpn-autostart

Revision history for this message
Vladimir Prus (vladimir-prus) wrote :

I still have this problem, essentially as originally reported, with openconnect on 12.04. Here's what my log say:

May 27 13:32:27 solid NetworkManager[1011]: <info> Starting VPN service 'openconnect'...
May 27 13:32:27 solid NetworkManager[1011]: <info> VPN service 'openconnect' started (org.freedesktop.NetworkManager.openconnect), PID 20430
May 27 13:32:27 solid NetworkManager[1011]: <info> VPN service 'openconnect' appeared; activating connections
May 27 13:32:27 solid NetworkManager[1011]: <info> VPN plugin state changed: init (1)
May 27 13:34:27 solid NetworkManager[1011]: <error> [1338111267.901879] [nm-vpn-connection.c:934] get_secrets_cb(): Failed to request VPN secrets #3: (6) No agents were available for this request.

Revision history for this message
Shabang (theshabang) wrote :

I've the same problem!
Sometimes I can connect, sometimes the auth box doesn't appear!

Seems nm-applet problem.

my temporary fix:
pkill nm-applet
pkill gnome-shell

now execute (in this order)
nm-applet &
gnome-shell &

Revision history for this message
StephanBeal (sgbeal) wrote :

i'm still seeing this in 12.04. The "temp workaround" from comment #21 seems to get me the dialog, but... damn...

Revision history for this message
aalexand (alexander-s-alexandrov) wrote :

I can confirm StephanBeal's comment. I'm ussing 12.04 LTS with the latest updates but I'm still seeing the issue. The workaround from #21 works for me as well.

Revision history for this message
Niall Durham (dbc00per) wrote :

Confirming Shabang's workaround fixes my issue (as well as comment #22 and #23). I'm running 12.04.3 LTS w/ the latest updates. IIRC my original install was 11.04 and I used the update-manager to upgrade my release.

Linux calculon 3.2.0-53-generic #81-Ubuntu SMP Thu Aug 22 21:01:03 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Ronan Jouchet (ronj) wrote :

Confirming this bug is still present as of network-manager-openconnect: 0.9.8.0-1ubuntu2

Revision history for this message
Christopher (chalbersma-12) wrote :

Howdy I was testing 20.04 (which has version 1.2.4-2ubuntu1 of network-manager-openconnect) and I believe this may still be an issue.

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.