FS#13491 - netcfg-git wants to start network only after 2nd try

Attached to Project: Arch Linux
Opened by janis (Stalafin) - Wednesday, 25 February 2009, 23:54 GMT
Last edited by James Rayner (iphitus) - Tuesday, 28 April 2009, 12:45 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To James Rayner (iphitus)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I have to call 'sudo netcfg ethernet' twice (and in rare cases thrice) in order to be connected to my ethernet connection.

This is the output:

###########
# first try
###########
$ sudo netcfg ethernet
:: ethernet up [BUSY]
eth0: timed out
/usr/lib/network/network: line 12: stat_append: command not found
[FAIL]
############
# second try
############
$ sudo netcfg ethernet
:: ethernet up [BUSY]
eth0: hardware address 00:af:e6:c9:77:9a claims 10.100.8.192
eth0: timed out
/usr/lib/network/network: line 12: stat_append: command not found

[FAIL]

####################
# third try - works!
####################
$ sudo netcfg ethernet
:: ethernet up [DONE]

########################################
# bringing interface down for next round
########################################
$ sudo netcfg -d ethernet
:: ethernet down [DONE]

###########
# first try
###########
$ sudo netcfg ethernet
:: ethernet up [BUSY]
eth0: timed out
/usr/lib/network/network: line 12: stat_append: command not found
[FAIL]
#####################
# second try - works!
#####################
$ sudo netcfg ethernet
:: ethernet up [DONE]



Additional info:
package version is: netcfg-git 20090216-1 from AUR

Steps to reproduce:
I simply have to repeat what I was doing above.
This task depends upon

Closed by  James Rayner (iphitus)
Tuesday, 28 April 2009, 12:45 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#13334 
Comment by janis (Stalafin) - Thursday, 26 February 2009, 00:03 GMT
I forgot to mention, that bringing up the ethernet interface eth0 with a 'sudo ifconfig eth0 up' does NOT solve the problem. It seems the above issue is not connected to bringing up the interface as such.
Comment by James Rayner (iphitus) - Thursday, 26 February 2009, 10:46 GMT
Try with the latest git. Also give the ethernet-iproute profiles a shot as they'll replace ethernet eventually. There are examples in network.d/examples.

Thanks for filing bugs, I do appreciate it! You are the _only_ person who has tested netcfg-git and reported to me.
Comment by janis (Stalafin) - Thursday, 26 February 2009, 14:26 GMT
Heya,

I build a new package and ran it - the error persists. I also tried the ethernet-dhcp from network.d/examples, but it does not seem to work at all. Look:


######################################################
# Disable all interfaces before trying the new profile
######################################################
$ sudo netcfg -a
:: ethernet down [DONE]

####################################################
# First try of the ethernet-iproute example for dhcp
####################################################
$ sudo netcfg ethernet-dhcp
:: ethernet-dhcp up [BUSY] eth0: timed out
/usr/lib/network/network: line 12: stat_append: command not found
[FAIL]

############
# Second try
############
$ sudo netcfg ethernet-dhcp
:: ethernet-dhcp up [BUSY] eth0: timed out
/usr/lib/network/network: line 12: stat_append: command not found
[FAIL]
###########
# Third try
###########
$ sudo netcfg ethernet-dhcp
:: ethernet-dhcp up [BUSY] eth0: timed out
/usr/lib/network/network: line 12: stat_append: command not found
[FAIL]
############
# Fourth try
############
$ sudo netcfg ethernet-dhcp
:: ethernet-dhcp up [BUSY] eth0: timed out
/usr/lib/network/network: line 12: stat_append: command not found
[FAIL]

######## Here I decide to stop it, as apparently it does not work ########

##############################
# First try of the old profile
##############################
$ sudo netcfg ethernet
:: ethernet up [BUSY] eth0: timed out
/usr/lib/network/network: line 12: stat_append: command not found
[FAIL]
#####################
# Second try - works!
#####################
$ sudo netcfg ethernet
:: ethernet up [DONE]




I tried to connect about ten times via the ethernet-dhcp profile from examples, but it did not work out. However, connecting via my old profile, which, essentially, is the same as the ethernet-dhcp profile from examples before the changes to iproute, worked (showing the same pattern with the first connect failing).
Strangely, the error messages are the same for both cases.

The only difference between both profiles is the "CONNECTION = " line, where the old profile reads "CONNECTION = ethernet" and the new one reads "CONNECTION = ethernet-iproute". Also, in the old profile there is a line "DHCP_TIMEOUT = 10", but I don't think it is relevant for this problem.
Comment by James Rayner (iphitus) - Thursday, 26 February 2009, 22:00 GMT
ok try now. It probably still won't work, but it will give you a more useful message.

Can you confirm that netcfg v2.1.2 does not exhibit this behaviour?
Comment by janis (Stalafin) - Friday, 27 February 2009, 05:54 GMT
Okay, with the new package I have another error:
$ sudo netcfg ethernet
:: ethernet up [BUSY] eth0: timed out
- DHCP IP lease attempt failed.
[FAIL]
$ sudo netcfg ethernet
:: ethernet up [DONE]


However, I experienced this error with the old netcfg, where I still had to bring up my ethernet interface by hand with 'ifconfig eth0 up'; afterwards I executing 'netcfg ethernet', which, if there was not enough time between starting the interface, lead to the same error as above 'DHCP IP lease attempt failed.'.

With the ethernet-dhcp example from network.d/examples using iproute I now get the same error as with the normal ethernet profile from above (however, it still won't connect).


I just removed the git netcfg and installed v2.1.2 - strangely, I do not need to bring up my eth0 interface by hand anymore... but I get the same errors as with netcfg-git. I think something during pacman -Rnscd and pacman -U wasn't completely updated/removed. I will restart my computer and see what happens.
Comment by janis (Stalafin) - Friday, 27 February 2009, 06:03 GMT
Restarting changed a few things: I can now confirm that I do not get this behaviour in netcfg v2.1.2. However, I assume that in netcfg-git that new error (the one with the failed dhcp ip lease attempt) is related to the connection made too quickly after bringing up the device. Because in netcfg v2.1.2 I get the following error (with the commands executed in a very very short period of time):

$ sudo ifconfig eth0 up
$ sudo netcfg ethernet
:: ethernet up - DHCP IP lease attempt failed [FAIL]
$ sudo netcfg ethernet
:: ethernet up [DONE]

The above behaviour I have observed for several months now, and I can safely say that if I wait several seconds after bringing up the device (maybe five) there will not be an error in establishing the connection.

By the way: I have never experienced anything like this with a wireless connections.


I have filed another bug report in regard to connecting to ethernet during boot-up without actually having an ethernet connected to the computer.
Comment by James Rayner (iphitus) - Sunday, 01 March 2009, 09:49 GMT
Ok, looks like it _may_ be a dupe of  FS#13334 . (but dont close it yet...)

Could you run the script ethcheck2.sh linked here: http://bugs.archlinux.org/task/13334

Thanks

Loading...