Ubuntu networking error on startup, works with restart

1

0

Recently on a system restart we are forced to activate our networking by manually entering the command

/etc/init.d/networking restart

otherwise eth0 is not defined or active.

Can anyone identify from this what the problem is and how we can resolve this?


Output of logs: cat /var/log/messages | grep eth0 (note that I manually turned it on once login failed to have this set)

Aug 17 13:05:48 sugarbackup-desktop kernel: [    4.216762] eth0: Tigon3 [partno(BCM95784M) rev 5784100 PHY(5784)] (PCI Express) 10/100/1000Base-T Ethernet 00:21:9b:72:90:ac
Aug 17 13:05:48 sugarbackup-desktop kernel: [    4.216766] eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[1] TSOcap[1]
Aug 17 13:05:48 sugarbackup-desktop kernel: [    4.216768] eth0: dma_rwctrl[76180000] dma_mask[64-bit]
Aug 17 13:05:49 sugarbackup-desktop kernel: [   16.814063] tg3: eth0: Link is up at 100 Mbps, full duplex.
Aug 17 13:05:49 sugarbackup-desktop kernel: [   16.814066] tg3: eth0: Flow control is on for TX and on for RX.
Aug 17 14:10:15 sugarbackup-desktop kernel: [    4.228756] eth0: Tigon3 [partno(BCM95784M) rev 5784100 PHY(5784)] (PCI Express) 10/100/1000Base-T Ethernet 00:21:9b:72:90:ac
Aug 17 14:10:15 sugarbackup-desktop kernel: [    4.228761] eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[1] TSOcap[1]
Aug 17 14:10:15 sugarbackup-desktop kernel: [    4.228763] eth0: dma_rwctrl[76180000] dma_mask[64-bit]
Aug 17 14:10:16 sugarbackup-desktop kernel: [   16.805430] tg3: eth0: Link is up at 100 Mbps, full duplex.
Aug 17 14:10:16 sugarbackup-desktop kernel: [   16.805433] tg3: eth0: Flow control is on for TX and on for RX.
Aug 17 15:05:58 sugarbackup-desktop kernel: [    4.244599] eth0: Tigon3 [partno(BCM95784M) rev 5784100 PHY(5784)] (PCI Express) 10/100/1000Base-T Ethernet 00:21:9b:72:90:ac
Aug 17 15:05:58 sugarbackup-desktop kernel: [    4.244603] eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[1] TSOcap[1]
Aug 17 15:05:58 sugarbackup-desktop kernel: [    4.244605] eth0: dma_rwctrl[76180000] dma_mask[64-bit]
Aug 17 15:05:59 sugarbackup-desktop kernel: [   16.738952] tg3: eth0: Link is up at 100 Mbps, full duplex.
Aug 17 15:05:59 sugarbackup-desktop kernel: [   16.738955] tg3: eth0: Flow control is on for TX and on for RX.
Aug 17 15:07:05 sugarbackup-desktop kernel: [  114.555430] ADDRCONF(NETDEV_UP): eth0: link is not ready
Aug 17 15:07:07 sugarbackup-desktop kernel: [  116.152273] tg3: eth0: Link is up at 100 Mbps, full duplex.
Aug 17 15:07:07 sugarbackup-desktop kernel: [  116.152278] tg3: eth0: Flow control is on for TX and on for RX.
Aug 17 15:07:07 sugarbackup-desktop kernel: [  116.152889] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Aug 17 15:20:27 sugarbackup-desktop kernel: [    4.212747] eth0: Tigon3 [partno(BCM95784M) rev 5784100 PHY(5784)] (PCI Express) 10/100/1000Base-T Ethernet 00:21:9b:72:90:ac
Aug 17 15:20:27 sugarbackup-desktop kernel: [    4.212751] eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[1] TSOcap[1]
Aug 17 15:20:27 sugarbackup-desktop kernel: [    4.212753] eth0: dma_rwctrl[76180000] dma_mask[64-bit]
Aug 17 15:20:27 sugarbackup-desktop kernel: [   16.797888] tg3: eth0: Link is up at 100 Mbps, full duplex.
Aug 17 15:20:27 sugarbackup-desktop kernel: [   16.797892] tg3: eth0: Flow control is on for TX and on for RX.
Aug 17 15:21:13 sugarbackup-desktop kernel: [   90.723423] ADDRCONF(NETDEV_UP): eth0: link is not ready
Aug 17 15:21:15 sugarbackup-desktop kernel: [   92.258276] tg3: eth0: Link is up at 100 Mbps, full duplex.
Aug 17 15:21:15 sugarbackup-desktop kernel: [   92.258282] tg3: eth0: Flow control is on for TX and on for RX.
Aug 17 15:21:15 sugarbackup-desktop kernel: [   92.258450] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Aug 17 15:22:46 sugarbackup-desktop kernel: [  183.595465] ADDRCONF(NETDEV_UP): eth0: link is not ready
Aug 17 15:22:48 sugarbackup-desktop kernel: [  185.130353] tg3: eth0: Link is up at 100 Mbps, full duplex.
Aug 17 15:22:48 sugarbackup-desktop kernel: [  185.130359] tg3: eth0: Flow control is on for TX and on for RX.
Aug 17 15:22:48 sugarbackup-desktop kernel: [  185.130527] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Aug 17 16:42:34 sugarbackup-desktop kernel: [    4.228620] eth0: Tigon3 [partno(BCM95784M) rev 5784100 PHY(5784)] (PCI Express) 10/100/1000Base-T Ethernet 00:21:9b:72:90:ac
Aug 17 16:42:34 sugarbackup-desktop kernel: [    4.228623] eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[1] TSOcap[1]
Aug 17 16:42:34 sugarbackup-desktop kernel: [    4.228626] eth0: dma_rwctrl[76180000] dma_mask[64-bit]
Aug 17 16:42:35 sugarbackup-desktop kernel: [   16.843218] tg3: eth0: Link is up at 100 Mbps, full duplex.
Aug 17 16:42:35 sugarbackup-desktop kernel: [   16.843221] tg3: eth0: Flow control is on for TX and on for RX.
Aug 17 16:44:40 sugarbackup-desktop kernel: [  171.575406] ADDRCONF(NETDEV_UP): eth0: link is not ready
Aug 17 16:44:42 sugarbackup-desktop kernel: [  173.110268] tg3: eth0: Link is up at 100 Mbps, full duplex.
Aug 17 16:44:42 sugarbackup-desktop kernel: [  173.110275] tg3: eth0: Flow control is on for TX and on for RX.
Aug 17 16:44:42 sugarbackup-desktop kernel: [  173.110764] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Aug 17 17:00:35 sugarbackup-desktop kernel: [ 1126.999527] ADDRCONF(NETDEV_UP): eth0: link is not ready
Aug 17 17:00:37 sugarbackup-desktop kernel: [ 1128.714587] tg3: eth0: Link is up at 100 Mbps, full duplex.
Aug 17 17:00:37 sugarbackup-desktop kernel: [ 1128.714593] tg3: eth0: Flow control is on for TX and on for RX.
Aug 17 17:00:37 sugarbackup-desktop kernel: [ 1128.714766] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Aug 18 10:08:33 sugarbackup-desktop kernel: [    4.220739] eth0: Tigon3 [partno(BCM95784M) rev 5784100 PHY(5784)] (PCI Express) 10/100/1000Base-T Ethernet 00:21:9b:72:90:ac
Aug 18 10:08:33 sugarbackup-desktop kernel: [    4.220742] eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[1] TSOcap[1]
Aug 18 10:08:33 sugarbackup-desktop kernel: [    4.220745] eth0: dma_rwctrl[76180000] dma_mask[64-bit]
Aug 18 10:08:34 sugarbackup-desktop kernel: [   16.845252] tg3: eth0: Link is up at 100 Mbps, full duplex.
Aug 18 10:08:34 sugarbackup-desktop kernel: [   16.845255] tg3: eth0: Flow control is on for TX and on for RX.
Aug 18 10:09:34 sugarbackup-desktop kernel: [   94.511408] ADDRCONF(NETDEV_UP): eth0: link is not ready
Aug 18 10:09:37 sugarbackup-desktop kernel: [   96.046199] tg3: eth0: Link is up at 100 Mbps, full duplex.
Aug 18 10:09:37 sugarbackup-desktop kernel: [   96.046204] tg3: eth0: Flow control is on for TX and on for RX.
Aug 18 10:09:37 sugarbackup-desktop kernel: [   96.046648] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Aug 18 10:15:25 sugarbackup-desktop kernel: [    4.332749] eth0: Tigon3 [partno(BCM95784M) rev 5784100 PHY(5784)] (PCI Express) 10/100/1000Base-T Ethernet 00:21:9b:72:90:ac
Aug 18 10:15:25 sugarbackup-desktop kernel: [    4.332753] eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[1] TSOcap[1]
Aug 18 10:15:25 sugarbackup-desktop kernel: [    4.332755] eth0: dma_rwctrl[76180000] dma_mask[64-bit]
Aug 18 10:15:26 sugarbackup-desktop kernel: [   17.798590] tg3: eth0: Link is up at 100 Mbps, full duplex.
Aug 18 10:15:26 sugarbackup-desktop kernel: [   17.798594] tg3: eth0: Flow control is on for TX and on for RX.
Aug 18 10:17:36 sugarbackup-desktop kernel: [  172.483750] ADDRCONF(NETDEV_UP): eth0: link is not ready
Aug 18 10:17:38 sugarbackup-desktop kernel: [  174.081384] tg3: eth0: Link is up at 100 Mbps, full duplex.
Aug 18 10:17:38 sugarbackup-desktop kernel: [  174.081390] tg3: eth0: Flow control is on for TX and on for RX.
Aug 18 10:17:38 sugarbackup-desktop kernel: [  174.081815] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Aug 18 14:32:47 sugarbackup-desktop kernel: [    3.500752] eth0: Tigon3 [partno(BCM95784M) rev 5784100 PHY(5784)] (PCI Express) 10/100/1000Base-T Ethernet 00:21:9b:72:90:ac
Aug 18 14:32:47 sugarbackup-desktop kernel: [    3.500756] eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[1] TSOcap[1]
Aug 18 14:32:47 sugarbackup-desktop kernel: [    3.500758] eth0: dma_rwctrl[76180000] dma_mask[64-bit]
Aug 18 14:32:48 sugarbackup-desktop kernel: [   16.803614] tg3: eth0: Link is up at 100 Mbps, full duplex.
Aug 18 14:32:48 sugarbackup-desktop kernel: [   16.803617] tg3: eth0: Flow control is on for TX and on for RX.
Aug 18 14:33:37 sugarbackup-desktop kernel: [   91.987489] ADDRCONF(NETDEV_UP): eth0: link is not ready
Aug 18 14:33:38 sugarbackup-desktop kernel: [   93.522265] tg3: eth0: Link is up at 100 Mbps, full duplex.
Aug 18 14:33:38 sugarbackup-desktop kernel: [   93.522271] tg3: eth0: Flow control is on for TX and on for RX.
Aug 18 14:33:38 sugarbackup-desktop kernel: [   93.522597] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

root@sugarbackup-desktop:~# find /etc/rc*.d/*Netw*
/etc/rc2.d/S28NetworkManager
/etc/rc3.d/S28NetworkManager
/etc/rc4.d/S28NetworkManager
/etc/rc5.d/S28NetworkManager

root@sugarbackup-desktop:~# find /etc/rc*.d/*netw*
/etc/rc0.d/S35networking
/etc/rc6.d/S35networking
/etc/rcS.d/S40networking    

> 
# aptitude reinstall network-manager
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
The following packages will be REINSTALLED:
  network-manager 
The following packages will be REMOVED:
  libbsd-resource-perl{u} linux-headers-2.6.27-7{u} 
  linux-headers-2.6.27-7-generic{u} 
0 packages upgraded, 0 newly installed, 1 reinstalled, 3 to remove and 209 not upgraded.
Need to get 0B of archives. After unpacking 52.2MB will be freed.
Do you want to continue? [Y/n/?] y
E: I wasn't able to locate file for the network-manager package. This might mean you need to manually fix this package.
Writing extended state information... Done
E: I wasn't able to locate file for the network-manager package. This might mean you need to manually fix this package.
E: Internal error: couldn't generate list of packages to downloa

user5618

Posted 2009-08-18T09:53:48.910

Reputation:

Are you logged in to the graphical environment (Gnome or KDE)? How was the network configured in the first place? – None – 2009-08-18T09:58:35.377

sorry i don't know Gnome or KDE - ubuntu a few month new to me. network was configured as my note on #2 below, not using dhcp. thanks – None – 2009-08-18T13:35:59.067

Answers

1

You can check following things: - Check if there are issues with Getting the IP through DHCP. - On my ubuntu-9.04, its eth1 (no eth0 is created.) - There may be a race condition happening during booting... due to which The interface may be created after networking is enabled.

sudesh

Posted 2009-08-18T09:53:48.910

Reputation: 116

Thanks, we are not using DHCP, our interfaces file reads: auto lo iface lo inet loopback

auto eth0 iface eth0 inet static address 192.168.0.60 network 192.168.0.0 netmask 255.255.255.0 broadcast 192.168.0.255 gateway 192.168.0.201

yes, i think it might be this rare condition and that is what i am trying to find, what is disabling this on startup!? thanks – None – 2009-08-18T13:28:56.813

1

Obviously more details would help here, check your logs for any mention of eth0 with

# cat /var/log/messages | grep eth0

If you could add the output of the /etc/init.d/networking restart command to your question it would also help. As sudeshpawar has said this could be down to DHCP failing to assign an address in time.


It might be that the NetworkManager service is not starting but without log/dmesg output it's hard to tell.

Enabling and disabling services during start up in GNU/Linux

Ubuntu / Debian Linux: Services Configuration Tool to Start / Stop System Services

Check that the NetworkManager service is started at boot time with the following command :

 # find /etc/rc*.d/Network
/etc/rc2.d/S50NetworkManager
/etc/rc3.d/S50NetworkManager
/etc/rc4.d/S50NetworkManager
/etc/rc5.d/S50NetworkManager


From your /var/log/messages output we can see that eth0 comes up during boot after 16 seconds. I assume that the next activity is you restarting the network service.

 Aug 18 14:32:47 sugarbackup-desktop kernel: [ 3.500752] eth0: Tigon3 [partno(BCM95784M) rev 5784100 PHY(5784)] (PCI Express) 10/100/1000Base-T Ethernet 00:21:9b:72:90:ac
 Aug 18 14:32:47 sugarbackup-desktop kernel: [ 3.500756] eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[1] TSOcap[1] 
 Aug 18 14:32:47 sugarbackup-desktop kernel: [ 3.500758] eth0: dma_rwctrl[76180000] dma_mask[64-bit] 
 Aug 18 14:32:48 sugarbackup-desktop kernel: [ 16.803614] tg3: eth0: Link is up at 100 Mbps, full duplex. 
 Aug 18 14:32:48 sugarbackup-desktop kernel: [ 16.803617] tg3: eth0: Flow control is on for TX and on for RX.
 Aug 18 14:33:37 sugarbackup-desktop kernel: [ 91.987489] ADDRCONF(NETDEV_UP): eth0: link is not ready 
 Aug 18 14:33:38 sugarbackup-desktop kernel: [ 93.522265] tg3: eth0: Link is up at 100 Mbps, full duplex. 
 Aug 18 14:33:38 sugarbackup-desktop kernel: [ 93.522271] tg3: eth0: Flow control is on for TX and on for RX. 
 Aug 18 14:33:38 sugarbackup-desktop kernel: [ 93.522597] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

The ouput from the find command also looks correct, the only difference from my own is the 28 that is simply used to indicate the sequence in which all of the init scripts are started.

root@sugarbackup-desktop:~# find /etc/rc*.d/Netw*
/etc/rc2.d/S28NetworkManager 
/etc/rc3.d/S28NetworkManager 
/etc/rc4.d/S28NetworkManager
/etc/rc5.d/S28NetworkManager

The only area left to check is the GUI network manager tool. If your using GNOME right click on the network manager icon, select edit connections, highlight eth0 and select edit and ensure the connect automatically box is ticked.

enter image description here


If this still doesn't fix things please post the output of the following command just after booting.

# ifconfig eth0 
# ifup eth0
# ifconfig eth0

output

root@sugarbackup-desktop:~# ifconfig eth0 
eth0    Link encap:Ethernet HWaddr 00:21:9b:72:90:ac 
        BROADCAST MULTICAST MTU:1500 Metric:1 
        RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 
        collisions:0 txqueuelen:1000
        RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
        Interrupt:16

root@sugarbackup-desktop:~# ifup eth0 ifup: interface eth0 already configured exactly the same output for: ifconfig eth0

You could reinstall the networkmanager OR install a replacement like WICD.

To reinstall networkmanager run the following command

 # sudo aptitude reinstall network-manager

If you are running Ubuntu 9.04 (Jaunty) simply run this command to install WICD

 # sudo apt-get install wicd 

otherwise follow the guide here

lyarwood

Posted 2009-08-18T09:53:48.910

Reputation: 1 804

Thanks for your respone, we are not using DHCP see my not to sudeshpawar. Re the output, i will now paste it: root@sugarbackup-desktop:~# /etc/init.d/networking restart

  • Reconfiguring network interfaces... RTNETLINK answers: No such process

SIOCDELRT: No such process

  • Starting portmap daemon...
  • Already running. ...done.
  • Starting NFS common utilities ...done.
  • < – None – 2009-08-18T13:34:58.753

could you also provide the output of the # cat /var/log/messages | grep eth0 command please. It would also be better if you added these to your original question. – lyarwood – 2009-08-18T14:04:49.527

i have added as requested, below is the boot time info you requested - thanks

root@sugarbackup-desktop:~# find /etc/rc.d/Netw* /etc/rc2.d/S28NetworkManager /etc/rc3.d/S28NetworkManager /etc/rc4.d/S28NetworkManager /etc/rc5.d/S28NetworkManager root@sugarbackup-desktop:~# find /etc/rc.d/netw* /etc/rc0.d/S35networking /etc/rc6.d/S35networking /etc/rcS.d/S40networking – None – 2009-08-18T14:45:52.107

thanks - so its ok to the 1st 2 items, the last one for some reason in the GUI network config we have NOTHING! so hence i have no way to set it to automatically start.. note that for a few months this was working fine only recently did this occur.. we also had some lo-graphics mode issue when restarting that might have caused this.. p.s. how can i add a screenshot to this reply? – None – 2009-08-18T16:01:26.977

sorry missed your last point, here is the result - to me this is very odd !

root@sugarbackup-desktop:~# ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:21:9b:72:90:ac
BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:16

root@sugarbackup-desktop:~# ifup eth0 ifup: interface eth0 already configured

exactly the same output for: ifconfig eth0 – None – 2009-08-18T16:16:06.120

Ok thanks I've added the output to my answer. To add a screenshot you will need to first take a screenshot using the printscreen button on your keyboard. You will then need to host the image file that is created with a hosting service such photobuck.com. To include the screen shot in your post simply add the following HTML to your post:

<img src="URL_OF_YOUR_IMG"> – lyarwood – 2009-08-18T16:27:59.640

ok thanks. anyway, any more suggestions? rather baffling to me – None – 2009-08-18T16:32:49.520

updated You can always reinstall the network-manager package or install a replacement like WICD. – lyarwood – 2009-08-18T16:49:49.830

Thanks.. its failed

root@sugarbackup-desktop:~# aptitude reinstall network-manager Reading package lists... Done Building dependency tree
Reading state information... Done Reading extended state information
Initializing package states... Done The following packages will be REINSTALLED: network-manager The following packages will be REMOVED: libbsd-resource-perl{u} linux-headers-2.6.27-7{u} linux-headers-2.6.27-7-generic{u} 0 packages upgraded, 0 newly installed, 1 reinstalled, 3 to remove and 209 not upgraded. – None – 2009-08-19T08:26:20.523

Need to get 0B of archives. After unpacking 52.2MB will be freed. Do you want to continue? [Y/n/?] y E: I wasn't able to locate file for the network-manager package. This might mean you need to manually fix this package. Writing extended state information... Done E: I wasn't able to locate file for the network-manager package. This might mean you need to manually fix this package. E: Internal error: couldn't generate list of packages to download – None – 2009-08-19T08:26:53.627

You can download the package here http://packages.ubuntu.com/jaunty/i386/network-manager/download (32bit)

– lyarwood – 2009-08-19T13:59:08.230

1

What happens when you try restarting the network stack?

/etc/init.d/networking restart

Also, since you are configured with a static IP, are you connected to a router that is trying to pass out DHCP adresses? If so, can you disable DHCP on your router, and have it simply act as a gateway?

That might be part of the reason why you are not getting any traffic out. As far as why you can't bring the card up, make sure the drivers are installed. modprobe the driver into kernel and try ifconfig eth0 static 192.168.0.X up. (x is a variable to represent different IP adresses).

Do not use network manager, it doesn't work and it isn't necessary. In fact, network manager more often than not fails to correctly configure the Linux subsystem which is directly responsible for managing your network stack.

Nathan Smith

Posted 2009-08-18T09:53:48.910

Reputation: 11