You are not logged in.

#1 2013-09-25 19:34:26

renegat
Member
From: Europe
Registered: 2012-12-28
Posts: 88

[SOLVED] wpa_supplicant@.service fails to start

I used to start my wireless network connection with enabled  wpa_supplicant@wlan0.service file and a dhcpcd@wlan0.service file which worked flawless... till last update.
I use the old network naming scheme (wlan0 but cryptic wlp2s0bc3h7..... )

Now every time I (re)boot I get no connection but the following error:

dhcpcd[627]: wlan0: starting wpa_supplicant
dhcpcd[647]: wlan0: failed to start wpa_supplicant
dhcpcd[649]: wlan0: Successfully initialized wpa_supplicant
ctrl_iface exists and seems to be in use - cannot override it 
Delete '/run/wpa_supplicant/wlan0' manually if it is not used anymore
Failed to initialize control interface 'DIR=/run/wpa_supplicant GROUP=wheel'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.

Even when I do delete the file manually, next boot same problem: No network, same error!
I can manually restart the service files and get network working... till next reboot.

# systemctl status wpa_supplicant@wlan0

wpa_supplicant@wlan0.service - WPA supplicant daemon (interface-specific version)
   Loaded: loaded (/usr/lib/systemd/system/wpa_supplicant@.service; enabled)
   Active: active (running) since Mi 2013-09-25 21:03:17 CEST; 14min ago
 Main PID: 621 (wpa_supplicant)
   CGroup: /system.slice/system-wpa_supplicant.slice/wpa_supplicant@wlan0.service
           └─621 /usr/sbin//wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-wlan0.conf -iwlan0

Sep 25 21:03:17 Netbook systemd[1]: Starting WPA supplicant daemon (interface-specific version)...
Sep 25 21:03:17 Netbook systemd[1]: Started WPA supplicant daemon (interface-specific version).

Any idea how to get the network connection back on start using wpa_supplicant@.service?

Last edited by renegat (2013-11-01 15:00:18)

Offline

#2 2013-09-26 23:16:38

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [SOLVED] wpa_supplicant@.service fails to start

renegat wrote:
dhcpcd[627]: wlan0: starting wpa_supplicant
dhcpcd[647]: wlan0: failed to start wpa_supplicant

dhcpcd runs some hooks by itself, maybe something new there. Perhaps that dhcpcd service is competing with the already started wpa_supplicant one? You could try just disabling the wpa_supplicant service.
Also you could try to add a

ExecStop=/usr/bin/ip link set dev %i down

to the wpa_supplicant service, or use a custom service file as found in the wireless wiki.

Offline

#3 2013-09-27 08:32:02

renegat
Member
From: Europe
Registered: 2012-12-28
Posts: 88

Re: [SOLVED] wpa_supplicant@.service fails to start

Hello and thank you for your response.

Meanwhile I'am using the .service file from the wiki but I was curious about why this special and somehow elegant way by using wpa_supplicant@.service and dhcpcd@.service to start wireless does suddenly not work anymore.
It was a hard peace of work to get my RTL8187SE working which as I've been warned is from the staging directory - but it worked till update to systemd 207.
The biggest advantage of using this way is that in case you are using a wlan device with a hardware switch (laptop e.g.) the service files starts and stopps along with it - the wiki network.service file just fails if network is not enabled during boot.

The original wpa_supplicant@.service file produces the following error:

# systemctl status wpa_supplicant@wlan0

wpa_supplicant@wlan0.service - WPA supplicant daemon (interface-specific version)
   Loaded: loaded (/usr/lib/systemd/system/wpa_supplicant@.service; enabled)
   Active: failed (Result: exit-code) since Fr 2013-09-27 09:45:06 CEST; 1min 23s ago
  Process: 717 ExecStop=/usr/bin/ip link set dev %i down (code=exited, status=0/SUCCESS)
  Process: 678 ExecStart=/usr/sbin//wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-%I.conf -i%I (code=exited, status=255)
 Main PID: 678 (code=exited, status=255)

systemd[1]: Starting WPA supplicant daemon (interface-specific version)...
systemd[1]: Started WPA supplicant daemon (interface-specific version).
wpa_supplicant[678]: Successfully initialized wpa_supplicant
wpa_supplicant[678]: ctrl_iface exists and seems to be in use - cannot override it
wpa_supplicant[678]: Delete '/run/wpa_supplicant/wlan0' manually if it is not used anymore
wpa_supplicant[678]: Failed to initialize control interface 'DIR=/run/wpa_supplicant GROUP=wheel'.
systemd[1]: wpa_supplicant@wlan0.service: main process exited, code=exited, status=255/n/a
systemd[1]: Unit wpa_supplicant@wlan0.service entered failed state.

Putting

ExecStop=/usr/bin/ip link set dev %i down

in the service file did not help
The problem does not affect Linux3.10.X-X / systemd 204-3 / i686 but Linux3.11.1-2 / systemd 207-5 / i686 on identical hardware

Edit I: Really something new there  - with a lack of documentation:

dhcpcd@.service starts wpa_supplicant when adressed to a wireless adapter by itself so wpa_supplicant@.service is no longer needed.

Edit II:
Meanwhile the wiki was updated with a Tip about this 'feature' but it does not mention that the new interface naming style must recognize and name an interface correctly as e.g. wlpXsY.
In my case Realtek RTL8187SE was named 'enp2s0' also it is a wireless lan controller and so the wpa_supplicant hook did not get started by the dhcpcd@.service!

Last edited by renegat (2013-11-06 21:17:29)

Offline

Board footer

Powered by FluxBB