Bug 402713 - Plasma NetworkManager OpenVPN fails to connect but displays no error, logs: AUTH: Received control message: AUTH_FAILED
Summary: Plasma NetworkManager OpenVPN fails to connect but displays no error, logs: A...
Status: REPORTED
Alias: None
Product: plasma-nm
Classification: Plasma
Component: general (show other bugs)
Version: 5.14.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-30 19:48 UTC by Dennis Schridde
Modified: 2020-01-15 09:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2018-12-30 19:48:12 UTC
SUMMARY
Plasma NetworkManager cannot connect with OpenVPN.  The logs say there was an authentication error, but the username/password is set in the config and the GUI did not report any error at all.


STEPS TO REPRODUCE
1. `nmcli connection import type openvpn file $OVPN_FILE`
2. Use Plasma NM to set the username and password for this connection
3. Press "Connect" in Plasma NM for this connection


OBSERVED RESULT
* GUI switches to "Connecting" and then back to "Never used" after some time (about 10s), with no indication of an error
* journalctl logs for NetworkManager,nm-openvpn,kdeinit5:
```
NetworkManager[901]: <info>  [1546198738.9532] audit: op="connection-activate" uuid="1e0beece-6525-4093-aa87-2964f3b5f269" name="ProtonVPN DE (TCP)" pid=1747 uid=1000 result="success"
NetworkManager[901]: <info>  [1546198738.9626] vpn-connection[0x557fc5f3c780,1e0beece-6525-4093-aa87-2964f3b5f269,"ProtonVPN DE (TCP)",0]: Started the VPN service, PID 29949
NetworkManager[901]: <info>  [1546198738.9734] vpn-connection[0x557fc5f3c780,1e0beece-6525-4093-aa87-2964f3b5f269,"ProtonVPN DE (TCP)",0]: Saw the service appear; activating connection
kdeinit5[1560]: plasma-nm: Unhandled VPN connection state change:  2
kdeinit5[1560]: plasma-nm: virtual NMVariantMapMap SecretAgent::GetSecrets(const NMVariantMapMap&, const QDBusObjectPath&, const QString&, const QStringList&, uint)
kdeinit5[1560]: plasma-nm: Path: "/org/freedesktop/NetworkManager/Settings/7"
kdeinit5[1560]: plasma-nm: Setting name: "vpn"
kdeinit5[1560]: plasma-nm: Hints: ()
kdeinit5[1560]: plasma-nm: Flags: 4
kdeinit5[1560]: plasma-nm: Unhandled VPN connection state change:  3
NetworkManager[901]: <info>  [1546198738.9959] vpn-connection[0x557fc5f3c780,1e0beece-6525-4093-aa87-2964f3b5f269,"ProtonVPN DE (TCP)",0]: VPN plugin: state changed: starting (3)
nm-openvpn[29952]: OpenVPN 2.4.6 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Dec 29 2018
nm-openvpn[29952]: library versions: OpenSSL 1.1.0j  20 Nov 2018
NetworkManager[901]: <info>  [1546198738.9984] audit: op="statistics" arg="refresh-rate-ms" pid=1747 uid=1000 result="success"
nm-openvpn[29952]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
nm-openvpn[29952]: TCP/UDP: Preserving recently used remote address: [AF_INET]37.58.58.230:21
nm-openvpn[29952]: Attempting to establish TCP connection with [AF_INET]37.58.58.230:21 [nonblock]
nm-openvpn[29952]: TCP connection established with [AF_INET]37.58.58.230:21
nm-openvpn[29952]: TCP_CLIENT link local: (not bound)
nm-openvpn[29952]: TCP_CLIENT link remote: [AF_INET]37.58.58.230:21
nm-openvpn[29952]: NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
nm-openvpn[29952]: WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1604', remote='link-mtu 1636'
nm-openvpn[29952]: WARNING: 'tun-mtu' is used inconsistently, local='tun-mtu 1500', remote='tun-mtu 1532'
nm-openvpn[29952]: [de-02.protonvpn.com] Peer Connection Initiated with [AF_INET]37.58.58.230:21
NetworkManager[901]: <info>  [1546198741.2024] audit: op="statistics" arg="refresh-rate-ms" pid=1747 uid=1000 result="success"
nm-openvpn[29952]: AUTH: Received control message: AUTH_FAILED
nm-openvpn[29952]: SIGUSR1[soft,auth-failure] received, process restarting
nm-openvpn[29952]: SIGTERM[hard,init_instance] received, process exiting
NetworkManager[901]: <warn>  [1546198746.8591] vpn-connection[0x557fc5f3c780,1e0beece-6525-4093-aa87-2964f3b5f269,"ProtonVPN DE (TCP)",0]: VPN plugin: failed: login-failed (0)
NetworkManager[901]: <warn>  [1546198746.8591] vpn-connection[0x557fc5f3c780,1e0beece-6525-4093-aa87-2964f3b5f269,"ProtonVPN DE (TCP)",0]: VPN plugin: failed: connect-failed (1)
NetworkManager[901]: <info>  [1546198746.8593] vpn-connection[0x557fc5f3c780,1e0beece-6525-4093-aa87-2964f3b5f269,"ProtonVPN DE (TCP)",0]: VPN plugin: state changed: stopping (5)
NetworkManager[901]: <info>  [1546198746.8597] vpn-connection[0x557fc5f3c780,1e0beece-6525-4093-aa87-2964f3b5f269,"ProtonVPN DE (TCP)",0]: VPN plugin: state changed: stopped (6)
NetworkManager[901]: <info>  [1546198746.8614] vpn-connection[0x557fc5f3c780,1e0beece-6525-4093-aa87-2964f3b5f269,"ProtonVPN DE (TCP)",0]: VPN service disappeared
```


EXPECTED RESULT
VPN connection should be established


SOFTWARE/OS VERSIONS
Linux: 4.20.0
KDE Applications Version: 18.12.0
KDE Plasma Version: 5.14.4
KDE Frameworks Version: 5.53.0
Qt Version: 5.11.3
Comment 1 Jan Grulich 2019-03-29 10:45:53 UTC
Does "nmcli connection up connection_name" work?
Comment 2 Christoph Feck 2019-04-19 10:06:59 UTC
If you can provide the information in comment #1, please add it.
Comment 3 Dennis Schridde 2019-04-19 13:23:30 UTC
(In reply to Jan Grulich from comment #1)
> Does "nmcli connection up connection_name" work?

(In reply to Christoph Feck from comment #2)
> If you can provide the information in comment #1, please add it.

Thank you for the reminder.

$ nmcli connection up $UUID
 Error: Connection activation failed: The connection attempt timed out
Hint: use 'journalctl -xe NM_CONNECTION=$UUID + NM_DEVICE=$IFACE' to get more details.
Comment 4 Matthew Woehlke 2019-12-26 17:33:27 UTC
Does it work if you import the connection using some other means? See also bug #396530.
Comment 5 Christoph Feck 2020-01-15 09:00:08 UTC
If you can provide the information requested in comment 4, please add it.