FS#63515 - [netctl] wireless-wpa-config does not start

Attached to Project: Arch Linux
Opened by Erich Eckner (deepthought) - Wednesday, 21 August 2019, 09:30 GMT
Last edited by Jelle van der Waa (jelly) - Friday, 11 August 2023, 15:48 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Jouke Witteveen (jouke)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

I have a wifi setup based on wireless-wpa-config - only the location of the config and the interface name are changed:

$ cat /etc/netctl/wifi-eduroam
Description='A wpa_supplicant configuration file based wireless connection'
Interface=wlp2s0
Connection=wireless
Security=wpa-config
WPAConfigFile='/etc/netctl/wifi-eduroam.conf'
IP=dhcp

However, starting this with
$ netctl start wifi-eduroam
fails:
Aug 21 10:58:32 rodrigues network[2509]: Starting network profile 'wifi-eduroam'...
Aug 21 10:58:51 rodrigues network[2509]: WPA association/authentication failed for interface 'wlp2s0'
Aug 21 10:58:51 rodrigues network[2509]: Failed to bring the network up for profile 'wifi-eduroam'
Aug 21 10:58:51 rodrigues systemd[1]: netctl@wifi\x2deduroam.service: Main process exited, code=exited, status=1/FAILURE
Aug 21 10:58:51 rodrigues systemd[1]: netctl@wifi\x2deduroam.service: Failed with result 'exit-code'.
Aug 21 10:58:51 rodrigues systemd[1]: Failed to start Networking for netctl profile wifi-eduroam.

I thought, I had an error in my configuration, so I tried to start it manually with
$ wpa_supplicant -c /etc/netctl/wifi-eduroam.conf -i wlp2s0
which worked fine. And a
$ dhcpcd -i wlp2s0
afterwards to get an ip address brought the net fully up.

This looks like a bug in netctl to me (so I opened one). But on second thought, it might also be some security feature of systemd preventing access to the config file (?) or the certificate (also stored in /etc/netctl and referenced by absolute path) - however, the error message does not indicate any read-permission / file-not-found issue.

Additional info:
* package version(s)
wpa_supplicant 2:2.8-1
netctl 1.20-1
linux 5.2.9.arch1-1
systemd 242.84-2

* config and/or log files etc.
--- /etc/netctl/wifi-eduroam --- start ---
Description='A wpa_supplicant configuration file based wireless connection'
Interface=wlp2s0
Connection=wireless
Security=wpa-config
WPAConfigFile='/etc/netctl/wifi-eduroam.conf'
IP=dhcp
--- /etc/netctl/wifi-eduroam --- end ---

--- /etc/netctl/wifi-eduroam.conf --- start ---
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0

network={
ssid="eduroam"
key_mgmt=WPA-EAP
eap=TTLS
group=TKIP CCMP
pairwise=TKIP CCMP
anonymous_identity="obfuscated"
identity="obfuscated"
password="obfuscated
priority=1
phase2="auth=PAP"
ca_cert="/etc/netctl/T-TeleSec_GlobalRoot_Class_2.crt"
}
--- /etc/netctl/wifi-eduroam.conf --- end ---

Steps to reproduce:
Maybe it's enough to start a WPAConfigFile based profile with some referenced files (config, certificate), but I strongly doubt that.
This task depends upon

Closed by  Jelle van der Waa (jelly)
Friday, 11 August 2023, 15:48 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/n etctl/issues/6
Comment by Jouke Witteveen (jouke) - Wednesday, 21 August 2019, 15:04 GMT
Maybe the access point is just slow? What happens if you add something like TimeoutWPA=60 to your profile?
Comment by Toolybird (Toolybird) - Monday, 07 August 2023, 20:50 GMT
Dupe  FS#79318 
Comment by Jouke Witteveen (jouke) - Monday, 07 August 2023, 21:46 GMT
Alternatively, you may have run into a quoting mistake. You could try to use the 64 character hexadecimal key returned by `wpa_passphrase SSID` (where you replace SSID by your SSID) just to be sure.
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.
Comment by Sven (avanc) - Thursday, 10 August 2023, 08:24 GMT
Bug is still valid, see linked duplicate.
Interesting observations so far:

* Connection to other SSID with same password works
* Increasing TimeoutWPA increases time until service fails
* I would expect that the service immediately fails if the password is wrong.
Comment by Sven (avanc) - Thursday, 10 August 2023, 08:32 GMT
Is there an option to increase verbosity of netctl?
Comment by Jouke Witteveen (jouke) - Thursday, 10 August 2023, 17:52 GMT
You can add `NETCTL_DEBUG=yes` to your profile, but I don't expect much useful information from it. What you could try is 'intercept' the wpa_supplicant configuration file created by netctl in `/run/netctl` and find out how it differs from the one created by wpa_passphrase (which, IIRC, worked for you). I expect the only meaningful difference to be the "key_mgmt=WPA-PSK SAE" line. If that causes trouble, it might be that your network is not WPA2/WPA3 secured.
Comment by Sven (avanc) - Friday, 11 August 2023, 08:36 GMT
Thanks for the hints.

If I remove the option "key_mgmt=WPA-PSK SAE" AND "iee80211w=1" introduced by netctl, it works without a problem!
With the configuration parameters, dhcpd fails:
dhcpcd-10.0.1 starting
DUID 00:01:00:01:22:2d:31:29:a4:4e:31:0c:8d:64
wlp3s0: waiting for carrier
wlp3s0: carrier lost
timed out
dhcpcd exited
dhcpcd_fork_cb: truncated read 0 (expected 4)

However, my FRITZ!Box 7590 states it uses "WPA2 + WPA3".
Again open for suggestions.

Loading...