Immediate disconnection of wpa_supplicant and dhcpcd after successful connection
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
wicd |
New
|
Undecided
|
Unassigned | ||
Arch Linux |
New
|
Undecided
|
Unassigned |
Bug Description
When starting a new wireless connection to my home network, wicd starts wpa_supplicant correctly, then starts DHCPCD correctly and almost immediately sends a disconnection order to both program.
The result is the following:
MACHINE ~ # ps ax | grep wpa && ps ax | grep dhcp <-------------- NOTHING BEFORE
6309 pts/0 S+ 0:00 grep --colour=auto wpa
6311 pts/0 S+ 0:00 grep --colour=auto dhcp
MACHINE ~ # ps ax | grep wpa && ps ax | grep dhcp
6314 ? Ss 0:00 wpa_supplicant -B -i ath0 -c /var/lib/
6321 pts/0 S+ 0:00 grep --colour=auto wpa
6323 pts/0 S+ 0:00 grep --colour=auto dhcp
MACHINE ~ # ps ax | grep wpa && ps ax | grep dhcp <-------------- WPA_SUPPLICANT STARTS
6314 ? Ss 0:00 wpa_supplicant -B -i ath0 -c /var/lib/
6326 pts/0 S+ 0:00 grep --colour=auto wpa
6328 pts/0 S+ 0:00 grep --colour=auto dhcp
[...]
MACHINE ~ # ps ax | grep wpa && ps ax | grep dhcp <-------------- DHCPCD STARTS
6314 ? Ss 0:00 wpa_supplicant -B -i ath0 -c /var/lib/
6381 pts/0 S+ 0:00 grep --colour=auto wpa
6371 ? Ss 0:00 /sbin/dhcpcd ath0 -h MACHINE
6385 pts/0 S+ 0:00 grep --colour=auto dhcp
[...]
MACHINE ~ # ps ax | grep wpa && ps ax | grep dhcp <-------------- DHCPCD IS KILLED ALMOST IMMEDIATELY!
6314 ? Ss 0:00 wpa_supplicant -B -i ath0 -c /var/lib/
6403 pts/0 S+ 0:00 grep --colour=auto wpa
6392 ? S 0:00 /sbin/dhcpcd -k ath0
6405 pts/0 S+ 0:00 grep --colour=auto dhcp
MACHINE ~ # ps ax | grep wpa && ps ax | grep dhcp <-------------- NOTHING LEFT!
6417 pts/0 S+ 0:00 grep --colour=auto wpa
6419 pts/0 S+ 0:00 grep --colour=auto dhcp
Which results in an autoreconnect procedure which gives the same results.
Here are the results of a "wicd -afoe" command:
-------
wicd initializing...
-------
wicd is version 1.7.1b2 565
setting backend to external
trying to load backend external
successfully loaded backend external
trying to load backend external
successfully loaded backend external
Automatically detected wireless interface ath0
setting wireless interface ath0
automatically detected wired interface eth0
setting wired interface eth0
setting wpa driver wext
setting use global dns to False
setting global dns
global dns servers are None None None
domain is None
search domain is None
setting automatically reconnect when connection drops True
Setting dhcp client to 0
Wireless configuration file found...
Wired configuration file found...
chmoding configuration files 0600...
chowning configuration files root:root...
Using wireless interface...ath0
Using wired interface...eth0
--no-autoconnect detected, not autoconnecting...
Connecting to wireless network Univers2
dhcpcd[19079]: dhcpcd not running
dev: Host name lookup failure
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
dhcpcd[19085]: dhcpcd not running
dev: Host name lookup failure
Putting interface down
Releasing DHCP leases...
dhcpcd[19092]: dhcpcd not running
Setting false IP...
Stopping wpa_supplicant
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Flushing the routing table...
dev: Host name lookup failure
Putting interface up...
Generating psk...
Attempting to authenticate...
Running DHCP with hostname MACHINE
dhcpcd[19196]: version 5.2.12 starting
dhcpcd[19196]: forked to background, child pid 19197
DHCP connection successful
not verifying
Connecting thread exiting.
Sending connection attempt result Success
dhcpcd[19317]: sending signal 1 to pid 19197
dhcpcd[19317]: waiting for pid 19197 to exit
dev: Host name lookup failure
dhcpcd[19349]: dhcpcd not running
dev: Host name lookup failure
Connecting to wireless network Univers2
dhcpcd[19405]: dhcpcd not running
dev: Host name lookup failure
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
dhcpcd[19411]: dhcpcd not running
dev: Host name lookup failure
Putting interface down
Releasing DHCP leases...
dhcpcd[19418]: dhcpcd not running
Setting false IP...
Stopping wpa_supplicant
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Flushing the routing table...
dev: Host name lookup failure
Putting interface up...
Generating psk...
Attempting to authenticate...
Running DHCP with hostname MACHINE
dhcpcd[19502]: version 5.2.12 starting
dhcpcd[19502]: forked to background, child pid 19503
DHCP connection successful
not verifying
Connecting thread exiting.
Sending connection attempt result Success
Starting automatic reconnect process
Autoconnecting...
No wired connection present, attempting to autoconnect to wireless network
hidden
trying to automatically connect to...Univers2
Connecting to wireless network Univers2
dhcpcd[19541]: sending signal 1 to pid 19503
dhcpcd[19541]: waiting for pid 19503 to exit
dev: Host name lookup failure
dhcpcd[19556]: dhcpcd not running
dev: Host name lookup failure
Putting interface down
Releasing DHCP leases...
dhcpcd[19564]: dhcpcd not running
Setting false IP...
Stopping wpa_supplicant
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Flushing the routing table...
dev: Host name lookup failure
Putting interface up...
dhcpcd[19572]: dhcpcd not running
dev: Host name lookup failure
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
dhcpcd[19578]: dhcpcd not running
dev: Host name lookup failure
Generating psk...
Attempting to authenticate...
Running DHCP with hostname MACHINE
dhcpcd[19614]: version 5.2.12 starting
dhcpcd[19614]: forked to background, child pid 19615
DHCP connection successful
not verifying
Connecting thread exiting.
Sending connection attempt result Success
Starting automatic reconnect process
Autoconnecting...
No wired connection present, attempting to autoconnect to wireless network
hidden
trying to automatically connect to...Univers2
Connecting to wireless network Univers2
dhcpcd[19641]: sending signal 1 to pid 19615
dhcpcd[19641]: waiting for pid 19615 to exit
dev: Host name lookup failure
dhcpcd[19656]: dhcpcd not running
dev: Host name lookup failure
Putting interface down
Releasing DHCP leases...
dhcpcd[19665]: dhcpcd not running
Setting false IP...
Stopping wpa_supplicant
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Flushing the routing table...
dev: Host name lookup failure
Putting interface up...
dhcpcd[19671]: dhcpcd not running
dev: Host name lookup failure
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
dhcpcd[19677]: dhcpcd not running
dev: Host name lookup failure
Generating psk...
Attempting to authenticate...
[MANUALLY CTRL+Ced]
As you can see, the result is always "success", but the monitor invokes the reconnect/retry procedure before DHCPCD actually ends its task.
I have tracked down the problem and build a primary diagnostic. The workaround that I use (and it is an HORRIBLE ONE but due to my poor knowledge of python I have to live with it) is to add a "time.sleep(15)" call in the "update_
It's obviously a problem of synchro because dhcpcd seems to take to long to fully acquire a DHCP address.
I am postively sure that my wpa_supplicant settings are correct, because if I use manually both command shown in the process list (ps ax) above, I get a stable wifi connection.
A few version information to help:
- wpa_supplicant: 0.7.3-r2
- dhcpcd: 5.2.12
- wicd: 1.7.1_beta2-r4
Thank you in advance!
Ivanux
I'm also testing the interplay of wicd 1.7.1~b3 and dhcpcd 5.2.12 right now (on Debian sid). I can reproduce your problems if either
- the global dhcpcd is running after for example "$ /etc/init.d/dhcpcd start" (which does not seem to be the case in your setup)
or
- I explicitly set "background" in my dhcpcd.conf (or dhcpcd somehow gets invoked with the "-b" option).
In both cases the problem is that when wicd invokes dhcpcd, the dhcpcd process immediately goes to the background while apparently wicd expects it to only go in the background after the lease has been successfully obtained.
Have you set "background" in your dhcpcd.conf? Maybe you could also try to explicitly set "waitip" in your dhcpcd.conf. If you run wicd in debug mode (which can be enabled through wicd-curses and the like) you will also see the command that wicd uses to invoke dhcpcd. Maybe through some black magic a "-b" has found its way into the options of dhcpcd?