Bug 3344 - Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Summary: Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: High major
Target Milestone: ---
Assignee: Olivier Blin
QA Contact:
URL:
Whiteboard: MGA2TOO
Keywords: NEEDINFO
: 5651 (view as bug list)
Depends on:
Blocks: 5015
  Show dependency treegraph
 
Reported: 2011-11-15 05:17 CET by Juan Luis Baptiste
Modified: 2015-03-31 02:25 CEST (History)
12 users (show)

See Also:
Source RPM: wpa_supplicant-0.7.3-5.mga2.src.rpm
CVE:
Status comment:


Attachments

Description Juan Luis Baptiste 2011-11-15 05:17:39 CET
Description of problem:

Since some time, my Intel wireless card isn't able to connect. It can list the wireless networks but drakroam or draknetcenter fail to connect. When running any of those two on a terminal I can see the following error messages:

Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
/sbin/ifdown: interface wlan0 is controlled by NetworkManager; skipping.
/sbin/ifup: interface wlan0 is controlled by NetworkManager; skipping.

On /etc/wpa_supplicant.conf the control interface is:

ctrl_interface=/var/run/wpa_supplicant

but /var/run/wpa_supplicant doesn't exist anymore. If I create that dir manually the error changes to:

Failed to connect to wpa_supplicant - wpa_ctrl_open: Success

but still it can't connect to the wireless network and the directory is removed after reboot.

My card:

iwlagn          : Intel Corporation|Device 008a [NETWORK_OTHER] (vendor:8086 device:008a subv:8086 subd:5325) (rev: 34)


How reproducible:
Always

Steps to Reproduce:
1. Update to latest cooker.
2. Open up drakroam from a terminal
3. Select a wireless network and configure it.
4. Connect to that network
5. Wait for a failure message and look at the terminal for the error messages from this bug report.
Comment 1 Sander Lepik 2011-11-15 08:30:24 CET
(In reply to comment #0)
> /sbin/ifdown: interface wlan0 is controlled by NetworkManager; skipping.
> /sbin/ifup: interface wlan0 is controlled by NetworkManager; skipping.



If you want to use drakroam or draknetcenter then you have to configure it that way. Uncheck NM when you configure your network.

CC: (none) => sander.lepik

Comment 2 Juan Luis Baptiste 2011-11-15 09:03:23 CET
That's another problem I forgot to mention: I'm not using NetworkManager, and there seems to be a bug with the "Allow this interface to be controlled by NetworkManager" checkbox. It always appear checked and I never have checked it. If you uncheck it and quit drakroam then it will correctly set NM_CONTROLLED=no in the ifcfg-xxx file, but when you open again drakroam and open the configuration dialog for the interface, the NetworkManager checkbox will appear checked again and NM_CONTROLLED=yes on the config file.
Comment 3 Sander Lepik 2011-11-15 09:25:31 CET
I noticed that too. But you can open bugreport about it. I'm quite sure it would solve this one as well..
Comment 4 Manuel Hiebel 2011-11-15 16:12:48 CET
what is the real issue ?
Comment 5 Juan Luis Baptiste 2011-11-15 16:50:47 CET
(In reply to comment #3)
> I noticed that too. But you can open bugreport about it. I'm quite sure it
> would solve this one as well..

I'm not that sure because if I manually set NM_CONTROLLED=no in the wireless interface and then try to bring it up using ifup command it still will fail.
Comment 6 Juan Luis Baptiste 2011-11-15 16:52:05 CET
(In reply to comment #4)
> what is the real issue ?

There seem to be two different issues here:

1. For some reason /var/run/wpa_supplicant is being removed and thus the wireless connection can't be established by wpa_supplicant. 

2. drakroam has an issue reading/saving the "Allow this interface to be controlled by NetworkManager" checkbox. And I'm not sure this one affects the other issue.

I opened the issue for the first one but then commented about the second one, which could be related or not.
Comment 7 Sander Lepik 2011-11-15 19:11:55 CET
If /var/run is not yet linked to /run then it soon will be which means it will be tmpfs. So /var/run should be emty when system starts.
Comment 8 Juan Luis Baptiste 2011-11-15 19:23:50 CET
(In reply to comment #7)
> If /var/run is not yet linked to /run then it soon will be which means it will
> be tmpfs. So /var/run should be emty when system starts.

It still isn't /run exists but is empty whereas /var/run is not. In any case, whether /run or /var/run is used, the wpa_supplicant directory has to be created with the named pipes it needs to work in there, which is what isn't happening.
Comment 9 Dave Hodgins 2011-11-15 20:42:37 CET
Is this the same as bug 2160 ?

CC: (none) => davidwhodgins

Comment 10 Juan Luis Baptiste 2011-11-15 23:57:33 CET
I don't think so, that one seems more to be a regression with the driver for RTL8192SE cards on kernel 3.1.x and networkmanager, which I don't even have installed:

[mageia@dci-laptop ~]$ rpm -qa|grep -i networkmanager
[mageia@dci-laptop ~]$ 

than a problem with wpa_supplicant which seems to be the problem here.

Also in my case booting with the old 2.6.38.7-desktop-1.mga kernel doesn't help.
Comment 11 Juan Luis Baptiste 2011-11-16 00:02:06 CET
This is what appears on /var/log/messages when doing an ifup wlan0 and NM_CONTROLLED=no for wlan0:

Nov 15 17:59:00 dci-laptop radvd[3184]: attempting to reread config file
Nov 15 17:59:00 dci-laptop radvd[3184]: no linklocal address configured for eth0
Nov 15 17:59:00 dci-laptop radvd[3184]: resuming normal operation
Nov 15 17:59:00 dci-laptop kernel: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Nov 15 17:59:06 dci-laptop radvd[3184]: attempting to reread config file
Nov 15 17:59:06 dci-laptop radvd[3184]: no linklocal address configured for eth0
Nov 15 17:59:06 dci-laptop radvd[3184]: resuming normal operation
Comment 12 Juan Luis Baptiste 2011-11-21 03:13:40 CET
Since last days I got the wireless connection back but just at boot time. Trying to bring up the wireless interface with drakroam will produce the same result as described initially on this bug report. Also using ifup wlan0 doesn't work:

[root@dci-laptop mageia]# ifup wlan0
Wireless device wlan0 is configured with a roaming daemon but isn't associated

Determining IP information for wlan0... failed; no link present.  Check cable?


But using "ifup wlan0 boot" works albeit the error message:

[root@dci-laptop mageia]# ifup wlan0 boot
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlan0 ; Invalid argument.
Comment 13 Olivier Blin 2011-11-23 23:54:24 CET
There was a bug in drakx-net that wrote NM_CONTROLLED=yes if the NM_CONTROLLED variable was present in ifcfg.
This is now fixed in drakx-net 1.0

There is now another bug when restarting the connection from drakroam or draknetcenter if NetworkManager is enabled.
It occurs at the moment the drakx-net tools overwrite the ifcfg file.
It seems NM detects that the ifcfg file is deleted, then puts the interface in MANAGED mode and starts its own wpa_supplicant. After a very short time, it detects that the ifcfg file is written back, puts the interface in UNMANAGED mode, but it seems it does not kill its wpa_supplicant.
Then conflicts occur between the two wpa_supplicant instances (one from drakx-net/initscripts, one from NM that should not be managing wlan0).

CC: (none) => mageia
Assignee: bugsquad => mageia

Comment 14 Juan Luis Baptiste 2011-11-24 05:52:03 CET
(In reply to comment #13)
> There is now another bug when restarting the connection from drakroam or
> draknetcenter if NetworkManager is enabled.
> It occurs at the moment the drakx-net tools overwrite the ifcfg file.
> It seems NM detects that the ifcfg file is deleted, then puts the interface in
> MANAGED mode and starts its own wpa_supplicant. After a very short time, it
> detects that the ifcfg file is written back, puts the interface in UNMANAGED
> mode, but it seems it does not kill its wpa_supplicant.
> Then conflicts occur between the two wpa_supplicant instances (one from
> drakx-net/initscripts, one from NM that should not be managing wlan0).

But that must be a different problem from this one as I don't have NetworkManager installed.

I'll test tomorrow with the new drakx-net to see if there's any difference.
Comment 15 Marja Van Waes 2012-02-27 21:17:41 CET
Pinging, because nothing has happened with this report for more than 3 months, it still has the status NEW or REOPENED.

CC: (none) => marja11

Comment 16 Juan Luis Baptiste 2012-02-28 02:10:54 CET
It still happens. This is the current output from draknetcenter on a terminal:

Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to create client object: Daemon not running
run-parts: /etc/sysconfig/network-scripts/hostname.d/avahi exited with return code 1
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to kill daemon. (No such file or directory)
Interface "wlan0" is already disabled.
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlan0 ; Invalid argument.


The network doesn't come up using draknetcenter but it does using drakconnect or at boot.
Comment 17 Kamil Rytarowski 2012-03-18 16:38:40 CET
I can confirm it, I faced it with Cauldron - I can't use Cauldron anymore because of this bug.

This should be a release blocker.

There are at least 2 major bugs: NM link against the drak application + wpa supplicant isn't working.

# lspci|grep Broadcom
04:00.0 Network controller: Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller (rev 01)

CC: (none) => n54

Marja Van Waes 2012-03-18 16:43:13 CET

Priority: Normal => High

Marja Van Waes 2012-03-18 20:08:38 CET

Blocks: (none) => 5015

Comment 18 Marja Van Waes 2012-03-21 14:10:08 CET
I do have the 

"Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory" 

bug too, since installing Mga2b2, but not all the time. Other times there is no complaint but then I get 

"WPA 4-way handshake fails"

And after a lot of trying again I just was finally able to connect to my accespoint.

(It won't survive a reboot, however, because of bug 4557)

I don't have networkmanager installed. 

$ lspcidrake -v | grep ipw2200
ipw2200         : Intel Corporation|PRO/Wireless 2200BG [Calexico2] Network
Connection [NETWORK_OTHER] (vendor:8086 device:4220 subv:8086 subd:2712) (rev:
05)
Comment 19 Marja Van Waes 2012-03-25 09:02:22 CEST
(In reply to comment #18)
> I do have the 
> 
> "Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or
> directory" 
> 
> bug too, since installing Mga2b2, but not all the time. 

I saw nor this, nor my other wpa issue since over 36 hours ago. Either my wpa issues had a different cause, or this bug got solved.
Comment 20 Sander Lepik 2012-03-26 10:25:41 CEST
Juan, can you test with new initscripts (9.34-12)?

Keywords: (none) => NEEDINFO

Comment 21 Juan Luis Baptiste 2012-03-27 08:43:51 CEST
Trying with drakroam I still get these messages when connecting:


Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory                                                        
Failed to kill daemon. (No such file or directory)                                                                                    
Interface "wlan0" is already disabled.
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlan0 ; Invalid argument.

But now network comes up, although drakroam doesn't refresh, thus still shows the wireless network as disconnected until I hit the Refresh button.
Comment 22 Sander Lepik 2012-03-27 13:25:38 CEST
Do you have networkmanager enabled or not?

If yes then you probably get this error.
Comment 23 Juan Luis Baptiste 2012-03-27 16:38:00 CEST
As I hae said multiple times on this report, I do NOT have networkmanager enabled.
Comment 24 Kamil Rytarowski 2012-03-30 15:50:18 CEST
OK, wifi is working now for me.
The problem is with some conflicts NM/wpa/drakconnect/etc - it can load two wpa_supplicant instances.
Olivier Blin 2012-04-02 22:17:15 CEST

Summary: Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory => NetworkManager spawns a wpa_supplicant instead even if interface is unmanaged, conflicting with drakx-net tools

Comment 25 Marja Van Waes 2012-04-19 16:20:20 CEST
@ Juan Luis and others affected:

Is this bug still valid with Mageia 2 beta 3?
Comment 26 Juan Luis Baptiste 2012-04-26 07:34:33 CEST
Sorry for the late reply:

Well it still shows the reported error messages but draknetcenter successfully connects, although after I see the popup notification with the new network configuration, the "Connecting..." dialog remains for some seconds, then it disappears as it couldn't connect to the network, and the connect/disconnect button remains in "Connect" instead of "Disconnect" as it should because the network was successfully connected.

Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to kill daemon. (No such file or directory)
Interface "wlan0" is already disabled.
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlan0 ; Invalid argument.
got wireless event: <2>WPA: Key negotiation completed with c0:c1:c0:2e:08:10 [PTK=CCMP GTK=TKIP] wlan0
got wireless event: <2>CTRL-EVENT-CONNECTED - Connection to c0:c1:c0:2e:08:10 completed (auth) [id=0 id_str=] wlan0
Marja Van Waes 2012-04-26 08:40:44 CEST

Keywords: NEEDINFO => (none)

Keith Refson 2012-05-03 23:20:46 CEST

CC: (none) => krefson

Andrew 2012-05-07 05:46:45 CEST

CC: (none) => theamazingchiepoo

Comment 27 Marja Van Waes 2012-05-26 13:09:14 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

Comment 28 Keith Refson 2012-05-26 13:25:53 CEST
*** Bug 5651 has been marked as a duplicate of this bug. ***
Florian Hubold 2012-06-03 19:24:15 CEST

CC: (none) => doktor5000

Comment 29 Marja Van Waes 2012-06-11 17:02:15 CEST
I understand, from doktor5000's list of most reported forum issues and from one forum thread I saw recently myself, that this bug is still valid in Mageia 2

Keywords: NEEDINFO => (none)
Whiteboard: (none) => MGA2TOO

Comment 30 Keith Refson 2012-06-14 08:54:35 CEST
Yes, this bug still happens in Mageia 2.

But the description is not quite correct. Even with the networkmanager packeges uninstalled Mga2 STILL spawns multiple wpa_supplicant processes.  This happens following

a. a suspend/resume
b. "service network restart"

This seems to be due to an error in /etc/wpa_supplicant.conf, which is generating
error messages

Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
which are written to stderr (NOT syslog) if drakroam is started from the command line.

There appears to be a workaround:  Adding

   ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

to /etc/wpa_supplicant.conf appears to fix the particular issue and allow reconnection.  With this addition, my wifi reconnects automatically and
apparently correctly following a suspend/resume or a "service network restart"
Comment 31 Juan Luis Baptiste 2012-06-14 18:28:18 CEST
As comment #30 says, this bug has nothing to do exclusively with NM. I, as the original reporter have said several times in comments # 2,10,14 and 23, that I DO NOT have NM installed, so this issue exists without it. I do not understand why the subject was changed to reflect that.
Comment 32 Marja Van Waes 2012-06-14 19:48:34 CEST
(In reply to comment #31)
> As comment #30 says, this bug has nothing to do exclusively with NM. I, as the
> original reporter have said several times in comments # 2,10,14 and 23, that I
> DO NOT have NM installed, so this issue exists without it. I do not understand
> why the subject was changed to reflect that.

OK, you reported this bug, so changing the summary back to what it was.

(In reply to comment #30)

> There appears to be a workaround:  Adding
> 
>    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
> 
> to /etc/wpa_supplicant.conf appears to fix the particular issue and allow
> reconnection.  With this addition, my wifi reconnects automatically and
> apparently correctly following a suspend/resume or a "service network restart"

Thx, Keith


@ blino,

This bug can't be used for NetworkManager conflicts with drakx-net anymore.

Is bug 2160 caused by that conflict?

Summary: NetworkManager spawns a wpa_supplicant instead even if interface is unmanaged, conflicting with drakx-net tools => Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory

Olav Vitters 2012-07-03 19:05:33 CEST

CC: (none) => olav

Comment 33 Olivier Blin 2012-07-03 20:39:34 CEST
I have opened bug 6675 about the wpa_supplicant + NetworkManager conflict.
Comment 34 Olivier Blin 2012-07-03 20:40:43 CEST
Juan Luis, please quote the output of this command:
ps ax | grep wpa
Comment 35 Juan Luis Baptiste 2012-07-04 05:16:14 CEST
Here it is:

[mageia@dci-laptop ~]$ ps ax | grep wpa
 2144 ?        S      0:06 /usr/sbin/wpa_supplicant -c /etc/wpa_supplicant.conf -u -P /var/run/wpa_supplicant.pid
Jérôme Hénin 2012-10-23 09:33:24 CEST

CC: (none) => heninj

Comment 36 Jérôme Hénin 2012-10-27 11:20:04 CEST
Fixed for me with update wpa_supplicant-1.0-3.mga3
Comment 37 Sander Lepik 2013-02-13 08:49:28 CET
Is this bug still present in cauldron?

Keywords: (none) => NEEDINFO

Comment 38 Philippe Leblanc 2013-04-22 19:15:03 CEST
I'm still experiencing this bug. I can only connect wirelessly on bootup. If after booting, I decide to disconnect from the access point and reconnect to the same one a few moments later, I get this from draknetcenter running from the terminal:

got wireless event: <3>CTRL-EVENT-TERMINATING - signal 15 received eth1
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to kill daemon. (No such file or directory)
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device eth1 ; Invalid argument.
Error for wireless request "Set Encode" (8B2A) :
    invalid argument "s:".

This results in the reconnection attempt failing. Still present as of MGA3RC. The only way I can connect to an access point is to configure the connection as usual, but when asked to start the connection, I must answer no otherwise it results in a failed connection. After answering no, I then reboot and end up with a system connected to desired access point.

My ifcfg-eth1 is:

[root@localhost network-scripts]# cat ifcfg-eth1
DEVICE=eth1
BOOTPROTO=dhcp
ONBOOT=yes
METRIC=35
MII_NOT_SUPPORTED=no
USERCTL=no
RESOLV_MODS=no
WIRELESS_MODE=Managed
WIRELESS_ESSID=UNR-WPA
WIRELESS_ENC_KEY=s:
WIRELESS_WPA_DRIVER=wext
WIRELESS_WPA_REASSOCIATE=no
IPV6INIT=no
IPV6TO4INIT=no
ACCOUNTING=no
NM_CONTROLLED=no
DHCP_CLIENT=dhclient
NEEDHOSTNAME=no
PEERDNS=yes
PEERYP=yes
PEERNTPD=no

CC: (none) => philippe.l

Comment 39 Philippe Leblanc 2013-04-24 17:18:39 CEST
Does anybody know if this affects the LiveCDs? If it does, it may prove complicated or difficult to connect to a wireless access point from a live session. In my experience, a reboot is needed to succesfully connect. In the context of a live session, a reboot means wiping the session clean which would make impossible to connect. Any thoughts?
Comment 40 Nic Baxter 2015-03-31 02:25:54 CEST
Since there are insufficient details provided in this report for us to investigate the issue further, and we have not received feedback to the information we have requested above, we will assume the problem was not reproducible, or has been fixed in one of the updates we have released for the reporter's distribution.

Users who have experienced this problem are encouraged to upgrade to the latest update of their distribution, and if this issue turns out to still be reproducible in the latest update, please reopen this bug with additional information.

Closing as OLD.

Status: NEW => RESOLVED
CC: (none) => nic
Resolution: (none) => OLD


Note You need to log in before you can comment on or make changes to this bug.