Ubuntu networking error on startup, works with restart
Solution 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.
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
Solution 2
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.
Solution 3
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.
Related videos on Youtube
![slhck](https://i.stack.imgur.com/jyNn1.png?s=256&g=1)
slhck
Updated on September 17, 2022Comments
-
slhck almost 2 years
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
-
Admin almost 15 yearsAre you logged in to the graphical environment (Gnome or KDE)? How was the network configured in the first place?
-
Admin almost 15 yearssorry 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
-
-
Admin almost 15 yearsThanks 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.
-
lyarwood almost 15 yearscould 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.
-
Admin almost 15 yearsi 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
-
Admin almost 15 yearsthanks - 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?
-
Admin almost 15 yearssorry 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
-
lyarwood almost 15 yearsOk 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">
-
Admin almost 15 yearsok thanks. anyway, any more suggestions? rather baffling to me
-
lyarwood almost 15 yearsupdated You can always reinstall the network-manager package or install a replacement like WICD.
-
Admin almost 15 yearsThanks.. 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.
-
Admin almost 15 yearsNeed 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
-
lyarwood almost 15 yearsYou can download the package here packages.ubuntu.com/jaunty/i386/network-manager/download (32bit)