"Waiting up to 60 more seconds for network configuration" at boot

Bug #885596 reported by Flapane
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ifupdown (Ubuntu)
Invalid
High
Steve Langasek

Bug Description

Ubuntu 11.10 32bit on Virtualbox and Win7 x64.
I get a "Waiting up to 60 seconds for network configuration" at boot, which causes the boot to be delayed by some minutes.
It's not a duplicate of bug #881079

------

/etc/network/interfaces:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

--------

ifconfig eth0:
eth0 Link encap:Ethernet HWaddr 08:00:27:8c:2f:18
          indirizzo inet:10.0.2.15 Bcast:10.0.2.255 Maschera:255.255.255.0
          indirizzo inet6: fe80::a00:27ff:fe8c:2f18/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:15 errors:0 dropped:0 overruns:0 frame:0
          TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
          collisioni:0 txqueuelen:1000
          Byte RX:2158 (2.1 KB) Byte TX:10613 (10.6 KB)

-----

Here's an extract of what Steve Langasek found to be "weird" in the kernel log (verbose mode) attached here:

Nov 2 16:06:31 virtualbox kernel: [ 25.934277] init: network-interface (eth0) pre-start process (350) exited normally
Nov 2 16:06:31 virtualbox kernel: [ 25.934627] init: network-interface (eth0) state changed from pre-start to spawned
Nov 2 16:06:31 virtualbox kernel: [ 25.934884] init: network-interface (eth0) state changed from spawned to post-start
Nov 2 16:06:31 virtualbox kernel: [ 25.935013] init: network-interface (eth0) state changed from post-start to running

Revision history for this message
Flapane (flapane) wrote :
description: updated
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Thank you for your report. However, this particular issue has already been reported an is duplicate of bug 881079, so is being marked as such. Please feel free to report any other bugs you find.

Revision history for this message
Flapane (flapane) wrote :

Dmitry:
Please read the last comments of bug 881079, as well the description of my bug, where I already wrote that this isn't a duplicate.
Thanks

Steve Langasek (vorlon)
Changed in ifupdown (Ubuntu):
assignee: nobody → Steve Langasek (vorlon)
importance: Undecided → High
Revision history for this message
Steve Langasek (vorlon) wrote :

Please show the output of 'ls -l /run/network'.

Changed in ifupdown (Ubuntu):
status: New → Incomplete
Revision history for this message
Flapane (flapane) wrote :

total 4
-rw-r--r-- 1 root root 16 2011-11-05 20:32 ifstate

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 885596] Re: "Waiting up to 60 more seconds for network configuration" at boot

On Sat, Nov 05, 2011 at 06:35:00PM -0000, Flapane wrote:
> total 4
> -rw-r--r-- 1 root root 16 2011-11-05 20:32 ifstate

Interesting. Is /etc/network/if-up.d/upstart present on your system? What
version of the ifupdown package do you have installed?

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Revision history for this message
Flapane (flapane) wrote :

/etc/network/if-up.d$ ls -l upstart
-rwxr-xr-x 1 root root 128 2010-02-20 06:37 upstart

aptitude versions ifupdown --> 0.7~alpha5.1ubuntu5

Revision history for this message
Steve Langasek (vorlon) wrote :

On Sat, Nov 05, 2011 at 09:19:19PM -0000, Flapane wrote:
> /etc/network/if-up.d$ ls -l upstart
> -rwxr-xr-x 1 root root 128 2010-02-20 06:37 upstart

Ah; this is definitely the wrong version of the file, it's more than a year
older than the necessary version.

> aptitude versions ifupdown --> 0.7~alpha5.1ubuntu5

This is the right version of the package, however. Have you modified this
script locally? Is there an /etc/network/if-up.d/upstart.dpkg-dist file?

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Revision history for this message
Flapane (flapane) wrote :

Weird, while upgrading from 11.04 I did a dist-upgrade, and upstart was supposed to be upgraded.
I've just done another update/upgrade, but it couldn't find newer versios (1.3.0-11).
I tried to reinstall it, but I still see 2010-02-20 as last modified date.

upstart.dpkg-dist is present and I haven't touch it.

Thanks

Revision history for this message
Steve Langasek (vorlon) wrote :

On Sun, Nov 06, 2011 at 09:02:20AM -0000, Flapane wrote:
> Weird, while upgrading from 11.04 I did a dist-upgrade, and upstart was supposed to be upgraded.
> I've just done another update/upgrade, but it couldn't find newer versios (1.3.0-11).
> I tried to reinstall it, but I still see 2010-02-20 as last modified date.

> upstart.dpkg-dist is present and I haven't touch it.

So at some point in the past, you have modified
/etc/network/if-up.d/upstart, and on upgrade when asked whether to use the
local or package-provided version of this script, you chose the local one.

The fix is to run 'sudo mv /etc/network/if-up.d/upstart.dpkg-dist
/etc/network/if-up.d/upstart'. Before you do that, however, please attach
the output of this command:

$ diff -u /etc/network/if-up.d/upstart{,.dpkg-dist}

Do you remember modifying this file by hand previously? If so, do you
remember why you modified it?

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Revision history for this message
Flapane (flapane) wrote :

To be honest I don't remember any manual modification sooner or later in 2/2010, but of course I can't be sure.
I don't remember any networking issue, so there shouldn't be any reason for modifying this file.
Is diff telling us something? I see a "-n" near "initctl emit".
Thanks

--- /etc/network/if-up.d/upstart 2010-02-20 06:37:23.000000000 +0100
+++ /etc/network/if-up.d/upstart.dpkg-dist 2011-09-14 20:24:57.000000000 +0200
@@ -1,9 +1,43 @@
 #!/bin/sh
+MARK_DEV_PREFIX="/run/network/ifup."
+MARK_STATIC_NETWORK_EMITTED="/run/network/static-network-up-emitted"

 set -e

-initctl emit net-device-up \
- "IFACE=$IFACE" \
- "LOGICAL=$LOGICAL" \
- "ADDRFAM=$ADDRFAM" \
- "METHOD=$METHOD"
+# lo emission handled by /etc/init/network-interface.conf
+if [ "$IFACE" != lo ]; then
+ initctl emit -n net-device-up \
+ "IFACE=$IFACE" \
+ "LOGICAL=$LOGICAL" \
+ "ADDRFAM=$ADDRFAM" \
+ "METHOD=$METHOD"
+fi
+
+get_auto_interfaces() {
+ # write to stdout a list of interfaces configured as 'auto' in interfaces(5)
+ local found=""
+ # stderr redirected as it outputs things like:
+ # Ignoring unknown interface eth0=eth0.
+ found=$(ifquery --list --allow auto 2>/dev/null) || return
+ set -- ${found}
+ echo "$@"
+}
+
+all_interfaces_up() {
+ # return true if all interfaces listed in /etc/network/interfaces as 'auto'
+ # are up. if no interfaces are found there, then "all [given] were up"
+ local prefix="$1" iface=""
+ for iface in $(get_auto_interfaces); do
+ # if cur interface does is not up, then all have not been brought up
+ [ -f "${prefix}${iface}" ] || return 1
+ done
+ return 0
+}
+
+# touch our own "marker" indicating that this interface has been brought up.
+: > "${MARK_DEV_PREFIX}$IFACE"
+
+if all_interfaces_up "${MARK_DEV_PREFIX}" &&
+ mkdir "${MARK_STATIC_NETWORK_EMITTED}" 2>/dev/null; then
+ initctl emit --no-wait static-network-up
+fi

Revision history for this message
Steve Langasek (vorlon) wrote :

On Sun, Nov 06, 2011 at 06:59:20PM -0000, Flapane wrote:
> To be honest I don't remember any manual modification sooner or later in
> 2/2010, but of course I can't be sure. I don't remember any networking
> issue, so there shouldn't be any reason for modifying this file. Is diff
> telling us something? I see a "-n" near "initctl emit".

The -n option to initctl looks like it may be what was changed. Otherwise,
your /etc/network/if-up.d/upstart is identical to the one that was included
in 10.04 LTS. If you don't know why you made this change, I recommend that
you just replace it with the .dpkg-dist version of the file.

Closing this report as invalid.

Changed in ifupdown (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Flapane (flapane) wrote :

Problem solved, then.
Thanks

Revision history for this message
Jake Swift (swiftimundo) wrote :

having the same problem after just upgrading to 11.10 but I dont have the upstart.dpkg-dist file. What do i do now? sorry I'm a bit of a newb at this :/

Revision history for this message
Steve Langasek (vorlon) wrote :

Jake,

There are any number of possible causes for this error message. You should check the contents of your /etc/network/interfaces file to verify that there are no interfaces listed as 'auto' there which are not present on your system.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.