Bug 1404550

Summary: Cannot establish VPN connection using KDE systray icon
Product: [Fedora] Fedora Reporter: Danny Ciarniello <danny>
Component: kf5-kdedAssignee: Daniel Vrátil <me>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: danny, dcbw, jgrulich, kde-sig, lkundrak, me, psimerda, rdieter, thaller, than
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-08 14:41:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Requested gdb output
none
gdb output with kscreen debuginfo
none
gdb output with powerdevil debuginfo none

Description Danny Ciarniello 2016-12-14 05:36:09 UTC
Description of problem:
It is not possible to establish a VPN connection using the KDE systray icon.  Clicking "Connect" for the VPN connection does nothing but the following appears in /var/log/messages:

NetworkManager[811]: <info>  [1481693293.3607] audit: op="connection-activate" uuid="8c900a7f-8d58-4b18-8b9d-80d7892c4c57" name="<Connection Name>" pid=1425 uid=1000 result="success"
NetworkManager[811]: <info>  [1481693293.3637] vpn-connection[0x55b9cc692120,8c900a7f-8d58-4b18-8b9d-80d7892c4c57,"<Connection Name>",0]: Started the VPN service, PID 3673
NetworkManager[811]: <info>  [1481693293.3722] vpn-connection[0x55b9cc692120,8c900a7f-8d58-4b18-8b9d-80d7892c4c57,"<Connection Name>",0]: Saw the service appear; activating connection
NetworkManager[811]: <error> [1481693293.3820] vpn-connection[0x55b9cc692120,8c900a7f-8d58-4b18-8b9d-80d7892c4c57,"<Connection Name>",0]: Failed to request VPN secrets #3: No agents were available for this request.
D

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Configure a VPN Connection
2. Click on the NetworkManager systray icon
3. Click Connect on VPN connection

Actual results:
Nothing (other than log entries as above)


Expected results:
Prompt to enter VPN password and connection established


Additional info:
- It is possible to establish the VPN Connection using nmcli.
- An established connection can be disconnected using the systray icon.
- This is for a Cisco VPN

Comment 1 Thomas Haller 2016-12-14 13:30:59 UTC
<Connection Name>",0]: Failed to request VPN secrets #3: No agents were available for this request.


you either need to store the password-system-wide, or you need a program that acts as a "secret-provider"/"password-agent"... whatever you call it.

nmcli, nm-applet, gnome-shell and plasma-nm should all be able to act as secret provider.


As you are running KDE and claim that it works with nmcli, I reassign the bug.

I assume with nmcli it only works when doing `nmcli --ask connection up $ID`, otherwise, there would be the same issue.

Comment 2 Danny Ciarniello 2016-12-14 16:50:42 UTC
It looks like the problem is that the "program that acts as a password-agent" is missing or broken.  This looks very much like the issue in bug 1398425 but the workaround given in that bug does not work for KDE.

In my situation I cannot store the password because the VPN system that I am connecting to uses one time passwords.  In other words, the required password is not constant.

Comment 3 Thomas Haller 2016-12-14 17:36:28 UTC
If you are using KDE, your intended "program that acts as a password-agent" is plasma-nm.

Of course, you could in parallel have nm-applet running, but that is not usually done on KDE. The NetworkManager-vpnc-gnome basically allows nm-applet to ask for passwords (among other things). This has no use fo plasma-nm.

Comment 4 Danny Ciarniello 2016-12-14 18:04:43 UTC
plasma-nm is installed on my system so I'm guessing that it's "broken".

I forgot to mention that this all worked fine in F24.  It broke when I updated to F25 which I only did about a week or so ago.

Comment 5 Jan Grulich 2016-12-15 06:07:48 UTC
There shouldn't be any difference between plasma-nm in Fedora 24 and the one in Fedora 25 so probably something went wrong during the upgrade. Have you tried to create your VPN connection one more time? Or trying to re-save it, like change something (e.g. name) and save it?

Also check if our kded module is running and you have plasma-nm-yourvpnplugin installed.

To check whether it's running use the first command from here https://techbase.kde.org/Projects/Solid/Plasma-nm.

Comment 6 Danny Ciarniello 2016-12-15 16:36:41 UTC
I have these plasma-nm modules installed:

plasma-nm.x86_64
plasma-nm-l2tp.x86_64
plasma-nm-openconnect.x86_64
plasma-nm-openswan.x86_64
plasma-nm-openvpn.x86_64
plasma-nm-pptp.x86_64
plasma-nm-vpnc.x86_64

I don't know what you mean by the kded module.  The only running process that shows kded is 

/usr/libexec/kf5/start_kdeinit --kded +kcminit_startup

I don't know if plasma-nm is the cause of the problem that I'm having but I've seen at least three VPN issues that seem to be caused by the upgrade from F24 to F25: this bug, bug 1398425, and http://fedoraforum.org/forum/showthread.php?p=1777791.  

I don't know whether the underlying cause is the same but there are at the very least a number of upgrade-related issues with NetworkManager's VPN window manager integration.

Comment 7 Jan Grulich 2016-12-16 10:05:50 UTC
Use this command below to check running kded module:
"if `qdbus org.kde.kded5 /kded org.kde.kded5.loadedModules | grep networkmanagement > /dev/null`; then echo "running"; else echo "not running"; fi"

Also as I said, try to create that connection again. Btw. what type of VPN is that?

Comment 8 Danny Ciarniello 2016-12-16 22:53:58 UTC
Sorry, I somehow missed the link you provided for checking whether the module is running but the answer is yes, it is.

I did try recreating the connection but it didn't help.

It's for a Cisco VPN (Vendor=cisco, service=org.freedesktop.NetworkManager.vpnc).

Comment 9 Jan Grulich 2016-12-22 08:31:21 UTC
1) Do you have KWallet enabled and configured? Could you check whether you accidentaly did not denied access to it from plasma-nm (in system settings → account details)?

2) Open a terminal and run:
$ export QT_LOGGING_RULES=plasma-nm*.debug=true
$ killall kded5
$ kded5

keep it open and try to activate your connection, you should get some debug output containing output like this one:

plasma-nm: Unhandled active connection state change:  1                                                                                                                                                                                     
plasma-nm: virtual NMVariantMapMap SecretAgent::GetSecrets(const NMVariantMapMap&, const QDBusObjectPath&, const QString&, const QStringList&, uint)
plasma-nm: Path: "/org/freedesktop/NetworkManager/Settings/3"
plasma-nm: Setting name: "802-11-wireless-security"
plasma-nm: Hints: ()
plasma-nm: Flags: 5

could you please then attach the output here?

Comment 10 Danny Ciarniello 2016-12-22 16:48:26 UTC
I wouldn't be using kwallet in any case but it wouldn't be useful in this case because the VPN connection uses one time passwords.

Maybe the problem is due to kded5?

# killall kded5
kded5: no process found

#kded5
============ START OUTPUT ===============
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/device_automounter.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/freespacenotifier.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/kscreen.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/ksysguard.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/appmenu.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/networkmanagement.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/proxyscout.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/remotedirnotify.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/soliduiserver.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/recentdocumentsnotifier.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/statusnotifierwatcher.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/platformstatus.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/networkstatus.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/desktopnotifier.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/ktimezoned.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/kwrited.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/filenamesearchmodule.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/khotkeys.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/solidautoeject.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/bluedevil.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/keyboard.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/obexftpdaemon.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/networkwatcher.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/baloosearchmodule.so"
kf5.kded: kded module "appmenu" has already been found using JSON metadata, please don't install the now unneeded .desktop file ("kded/appmenu.desktop").
kf5.kded: kded module "freespacenotifier" has already been found using JSON metadata, please don't install the now unneeded .desktop file ("kded/freespacenotifier.desktop").
kf5.kded: kded module "networkmanagement" has already been found using JSON metadata, please don't install the now unneeded .desktop file ("kded/networkmanagement.desktop").
kf5.kded: kded module "remotedirnotify" has already been found using JSON metadata, please don't install the now unneeded .desktop file ("kded/remotedirnotify.desktop").
kf5.kded: kded module "ksysguard" has already been found using JSON metadata, please don't install the now unneeded .desktop file ("kded/ksysguard.desktop").
kf5.kded: kded module "kscreen" has already been found using JSON metadata, please don't install the now unneeded .desktop file ("kded/kscreen.desktop").
kf5.kded: kded module "ktimezoned" has already been found using JSON metadata, please don't install the now unneeded .desktop file ("kded/ktimezoned.desktop").
kf5.kded: kded module "soliduiserver" has already been found using JSON metadata, please don't install the now unneeded .desktop file ("kded/soliduiserver.desktop").
kf5.kded: kded module "keyboard" has already been found using JSON metadata, please don't install the now unneeded .desktop file ("kded/keyboard.desktop").
kf5.kded: kded module "statusnotifierwatcher" has already been found using JSON metadata, please don't install the now unneeded .desktop file ("kded/statusnotifierwatcher.desktop").
kf5.kded: kded module "khotkeys" has already been found using JSON metadata, please don't install the now unneeded .desktop file ("kded/khotkeys.desktop").
kf5.kded: kded module "desktopnotifier" has already been found using JSON metadata, please don't install the now unneeded .desktop file ("kded/desktopnotifier.desktop").
kf5.kded: kded module "solidautoeject" has already been found using JSON metadata, please don't install the now unneeded .desktop file ("kded/solidautoeject.desktop").
BluezQt: Cannot open /dev/rfkill for reading!
Trying to convert empty KLocalizedString to QString.
Trying to convert empty KLocalizedString to QString.
Trying to convert empty KLocalizedString to QString.
kf5.kded: found kded module "touchpad" by prepending 'kded_' to the library path, please fix your metadata.
kf5.kded: found kded module "printmanager" by prepending 'kded_' to the library path, please fix your metadata.
kf5.kded: found kded module "colord" by prepending 'kded_' to the library path, please fix your metadata.
kf5.kded: found kded module "apperd" by prepending 'kded_' to the library path, please fix your metadata.
kf5.kded: found kded module "powerdevil" by prepending 'kded_' to the library path, please fix your metadata.
"/home/danny/.local/share/icc/.." is not an ICC profile
"/home/danny/.local/share/icc/." is not an ICC profile
powerdevil: No outputs have backlight property
networkmanager-qt: void NetworkManager::NetworkManagerPrivate::propertiesChanged(const QVariantMap&) Unhandled property "AllDevices"
networkmanager-qt: void NetworkManager::NetworkManagerPrivate::propertiesChanged(const QVariantMap&) Unhandled property "Devices"
networkmanager-qt: void NetworkManager::NetworkManagerPrivate::propertiesChanged(const QVariantMap&) Unhandled property "GlobalDnsConfiguration"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "LldpNeighbors"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Real"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "LldpNeighbors"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Real"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "LldpNeighbors"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Real"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "LldpNeighbors"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Real"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "S390Subchannels"
BluezQt: PendingCall Error: "The name org.bluez.obex was not provided by any .service files"
EDID ICC Profile already exists "/home/danny/.local/share/icc/edid-4eba094edb10f2dd151c63216bd771ed.icc"
BluezQt: Cannot open /dev/rfkill for reading!
powerdevil: Handle button events action could not check for screen configuration
Segmentation fault (core dumped)
============= END OUTPUT ============================

I did a complete re-install of my system with F24 and upgraded to F25 but my home directory has been around since I don't remember when - pre-F18 most likely.  Maybe issues with my local kde settings that haven't been properly updated by KDE over time?

Note that as far as I can tell, KDE is - present problem aside - running normally.

Comment 11 Rex Dieter 2016-12-22 17:04:16 UTC
OK, kded5 crashing would indeed cause many things to not work properly, including plasma-nm.

Can you try running kded5 under gdb?

$ gdb /usr/bin/kded5

...

(gdb) run
... crashes hopefully

(gdb) thread apply all backtrace


and post the result?

Comment 12 Danny Ciarniello 2016-12-22 21:19:10 UTC
Created attachment 1234880 [details]
Requested gdb output

Comment 13 Jan Grulich 2016-12-23 07:03:27 UTC
Hmm that would be the reason why you can't activate your VPN connections. I would try first removing kscreen config files which are located in $HOME/.local/share/kscreen/ to check if the crash is not caused by wrong config file. If the crash persists, install debug symbols for kscreen so you get full backtrace and we can then proceed next.

Comment 14 Danny Ciarniello 2016-12-24 01:21:19 UTC
I removed the kscreen configuration files and logged in.  Now kded5 is running after login but if I kill it and restart it, it still crashes so I've installed the kscreen debuginfo and re-generated the gdb output.

Comment 15 Danny Ciarniello 2016-12-24 01:22:09 UTC
Created attachment 1235164 [details]
gdb output with kscreen debuginfo

Comment 16 Jan Grulich 2017-01-02 07:57:25 UTC
Install please also debug symbols for powerdevil, it looks the crash is triggered from there.

Comment 17 Danny Ciarniello 2017-01-04 00:17:39 UTC
Created attachment 1237037 [details]
gdb output with powerdevil debuginfo

Comment 18 Danny Ciarniello 2017-01-08 05:35:50 UTC
Looks like the latest update to the plasma and kf5 packages has fixed the problem(s) that I've been having.  I am getting prompted for my password when starting the VPN connection and kded5 is now running.

Comment 19 Rex Dieter 2017-01-08 14:41:24 UTC
Thanks, closing per comment #18