Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] wpa_supplicant can't initialize control interface
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
kewlness
n00b
n00b


Joined: 25 Apr 2012
Posts: 5

PostPosted: Wed Apr 25, 2012 6:48 pm    Post subject: [SOLVED] wpa_supplicant can't initialize control interface Reply with quote

I have searched Google and these forums for answers but all answers I have found do not seem to address this type of issue. :(

Code:

# /etc/init.d/net.wlan0 start
 * Bringing up interface wlan0
 *   Starting wpa_supplicant on wlan0 ...
mkdir[ctrl_interface]: No such file or directory
Failed to initialize control interface '"/var/run/wpa_supplicant/"'.
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.

*    start-stop-daemon: failed to start  `/usr/sbin/wpa_suplicant'                  [ !! ]
* ERROR: net.wlan0 failed to start


Interestingly, /var/run/wpa_supplicant does actually exist. When I remove it, I still get the same error. I have checked ps aux | grep wpa_supplicant but it does not show any such processes running (which is not surprising since it can't even get started). When I reemerged wpa_supplicant again, /var/run/wpa_supplicant was automagically created. Any assistance on this one would be appreciated as I have no clue anymore (I've used all sorts of distros for years, Debian, Ubuntu, even CentOS but this is the first system I have ever put together myself so I still consider myself a noob)... :D

dmesg:
Code:

# dmesg | tail
[ 5360.158116] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 5486.727826] iwlwifi 0000:24:00.0: L1 Disabled; Enabling L0S
[ 5486.727963] iwlwifi 0000:24:00.0: Radio type=0x1-0x2-0x0
[ 5486.847223] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 5555.323582] iwlwifi 0000:24:00.0: L1 Disabled; Enabling L0S
[ 5555.323725] iwlwifi 0000:24:00.0: Radio type=0x1-0x2-0x0
[ 5555.442881] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 6910.401313] iwlwifi 0000:24:00.0: L1 Disabled; Enabling L0S
[ 6910.401449] iwlwifi 0000:24:00.0: Radio type=0x1-0x2-0x0
[ 6910.520956] ADDRCONF(NETDEV_UP): wlan0: link is not ready


/etc/conf.d/net:
Code:
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /usr/share/doc/openrc*/net.example* and save your configuration
# in /etc/conf.d/net (this file :]!).
dns_domain_lo="<SUPER SECRET DOMAIN PROVIDED :D >"

config_eth0="dhcp"

# WIRELESS
## Prefer wpa_supplicant over wireless-tools
modules="wpa_supplicant"
## Driver for the wireless device
wpa_supplicant_wlan0="-Dwext"
## Configure Interface wlan0
config_wlan0="dhcp"


/etc/wpa_supplicant/wpa_supplicant.conf:
Code:

ctrl_interface="/var/run/wpa_supplicant/"
ctrl_interface_group="wheel"
ap_scan=1

# Home Network
network={
   ssid="<SUPER SECRET SSID PROVIDED :D >"
   scan_ssid=1
   key_mgmt=WPA-PSK
   proto=WPA2
   psk="<SUPER SECRET KEY PROVIDED :D >"
}


Last edited by kewlness on Wed Apr 25, 2012 8:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Wed Apr 25, 2012 7:43 pm    Post subject: Reply with quote

kewlness,

One thing I noticed that's incomplete in /etc/conf.d/net is the wpa_supplicant line. Change it to:

Code:
wpa_supplicant_wlan0="-Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf"

_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
kewlness
n00b
n00b


Joined: 25 Apr 2012
Posts: 5

PostPosted: Wed Apr 25, 2012 7:51 pm    Post subject: Reply with quote

BillWho wrote:
kewlness,

One thing I noticed that's incomplete in /etc/conf.d/net is the wpa_supplicant line. Change it to:

Code:
wpa_supplicant_wlan0="-Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf"


Ah. Very correct and this has been changed.

However, even starting from the command-line (and with the above changes restarting net.wlan0) I get the same error.
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 4448

PostPosted: Wed Apr 25, 2012 8:08 pm    Post subject: Reply with quote

Messing with /etc/conf.d/net there won't have fixed it, no. All you've done there is repeating the default values in the initscript.

wpa_supplicant runs as root, so it can't be a permissions problem on the directory. Try running this and see if it prints out any new errors:
Code:
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -d

_________________
*.ebuild // /etc/service/*
Back to top
View user's profile Send private message
kewlness
n00b
n00b


Joined: 25 Apr 2012
Posts: 5

PostPosted: Wed Apr 25, 2012 8:27 pm    Post subject: Reply with quote

Ant P. wrote:
Messing with /etc/conf.d/net there won't have fixed it, no. All you've done there is repeating the default values in the initscript.

wpa_supplicant runs as root, so it can't be a permissions problem on the directory. Try running this and see if it prints out any new errors:
Code:
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -d


Here the output (same error but you might see something I don't):
Code:

# wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -d
Initializing interface 'wlan0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'
ctrl_interface='"/var/run/wpa_supplicant/"'
ctrl_interface_group='"wheel"'
ap_scan=1
Priority group 0
   id=0 ssid='EDITED'
WEXT: cfg80211-based driver detected
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf flags 0x0
netlink: Operstate: linkmode=1, operstate=5
Own MAC address: 10:0b:a9:51:80:a0
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_countermeasures
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: Supplicant port status: Unauthorized
EAPOL: Supplicant port status: Unauthorized
mkdir[ctrl_interface]: No such file or directory
Failed to initialize control interface '"/var/run/wpa_supplicant/"'.
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.

Failed to add interface wlan0
No keys have been configured - skip key clearing
State: DISCONNECTED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
wpa_driver_wext_set_countermeasures
No keys have been configured - skip key clearing
Cancelling scan request
Cancelling authentication timeout
netlink: Operstate: linkmode=0, operstate=6


Also, I thought it might be a permissions error as well, but I have not idea what they should be since these permissions make sense:
Code:

# ls -la /var/run | grep wpa
drwxr-xr-x  2 root root 4096 Apr 25 14:01 wpa_supplicant
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Wed Apr 25, 2012 8:36 pm    Post subject: Reply with quote

kewlness,

My wpa_supplicant interface line is

Code:
ctrl_interface=/var/run/wpa_supplicant

yours is
Code:
ctrl_interface="/var/run/wpa_supplicant/"

Try dropping the quotes and '/' at the end.

Here's my entire file:
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=1

network={
   ssid="wireless"
   psk="secret"
   proto=RSN
   key_mgmt=WPA-PSK
   pairwise=TKIP
   auth_alg=OPEN
   priority=5
   id_str="gentoo"
}

_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
kewlness
n00b
n00b


Joined: 25 Apr 2012
Posts: 5

PostPosted: Wed Apr 25, 2012 8:44 pm    Post subject: Reply with quote

BillWho wrote:
kewlness,

My wpa_supplicant interface line is

Code:
ctrl_interface=/var/run/wpa_supplicant

yours is
Code:
ctrl_interface="/var/run/wpa_supplicant/"

Try dropping the quotes and '/' at the end.
[/code]


Yep. That did it. Dropping the quotes around the ctrl_interface and the word "wheel" did the trick. Marking as solved.

Thanks! :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum