After upgrade to 12.04 NetworkManager does not start automatically on boot

Bug #663735 reported by N Dhert on 2010-10-20
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: network-manager

Ubuntu 10.04 LTS
On a regular Ubuntu 10.04 LTS (freshly installed), one has in the taskbar an icon representing 2 thick arrows up and down,

On my portable, where Ubuntu 10.04LTS is present, but two months ago upgraded from 9.04, I have only an icon representing
a wave with a red exclamation mark. With the mouse pointer on it, it shows in a balloon text: Networking disabled.
Clicking on it, shows a balloon text with 'Network Manager not running
$ sudo service network-manager status
says: network-manager stop/waiting
$ sudo service network-manager start
says: network-manager, start/running, process 1981
but nothing is changed (still Networking disabled, NetworkManager not running as above)
$ sudo service network-manager status
says again: network-manager stop/waiting

I can right click the icon and choose Edit connections ans change e.g. Method and set other IP settings, but this
is not recorded (because NetworkManager is not running?)

I had a manually edited /etc/network/interfaces in the past.

I was advised to try putting in /etc/network/interfaces only
auto lo
iface lo inet loopback
auto eth0

which I did and rebooted, but
this was even worse: could not connect anymore to the internet AT ALL.

Just to be able to write this bug report, I had to manually edit my /etc/network/interfaces again to
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp

and reboot
then a got a DHCP assigned IP again from our DHCP server over the local LAN

I believe already in 9.04, I had 'NetworkManager not running' and not the normal icon in the taskbar (can't
remember exactly how that icon looked, things in Ubuntu change all the time with every new upgrade (sigh) ...)

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: network-manager 0.8-0ubuntu3
ProcVersionSignature: Ubuntu 2.6.32-25.44-generic 2.6.32.21+drm33.7
Uname: Linux 2.6.32-25-generic i686
Architecture: i386
CRDA: Error: [Errno 2] No such file or directory
Date: Wed Oct 20 10:23:06 2010
IpRoute:
 143.129.75.0/24 dev eth0 proto kernel scope link src 143.129.75.178
 169.254.0.0/16 dev eth0 scope link metric 1000
 default via 143.129.75.254 dev eth0 metric 100
Keyfiles: Error: [Errno 2] No such file or directory
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: network-manager
WpaSupplicantLog:

N Dhert (ndhertcan) wrote :

Thanks for reporting this bug.

It seems as though NetworkManager fails to start at the point where it would read /etc/network/interfaces.

Let's try to clean up some things just in case: please take a backup of /etc/network/interfaces (say, to your home directory using 'cp /etc/network/interfaces ~/e-n-i.backup'), then remove all the comments from it. Ideally all that should be left are the entries for lo and eth0, like so:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

Reboot, then make sure network-manager is really stopped:

sudo stop network-manager

Finally, start network-manager again with the following command:

sudo /usr/sbin/NetworkManager --no-daemon --log-level=DEBUG --log-domains=USER_SET,SYS_SET,CORE,DEVICE >/tmp/nm.log 2>&1 &

NetworkManager should start up and write debug information to nm.log. Please get that log from /tmp/nm.log and attach it to this bug.

Changed in network-manager (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium
Launchpad Janitor (janitor) wrote :

[Expired for network-manager (Ubuntu) because there has been no activity for 60 days.]

Changed in network-manager (Ubuntu):
status: Incomplete → Expired
Daniil Ivanov (daniil-ivanov) wrote :

I observe the same situation after upgrading from 11.10 to 12.04. NetworkManager is not in the list of processes after boot and executing "sudo NetworkManager" fixes the defect.

Changed in network-manager (Ubuntu):
status: Expired → New
Daniil Ivanov (daniil-ivanov) wrote :

Here is the content of ~/.xsession-errors
** (nm-applet:2128): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: The name org.freedesktop.NetworkManager was not provided by any .service files
** Message: applet now removed from the notification area

(nm-applet:2128): GdkPixbuf-CRITICAL **: gdk_pixbuf_scale_simple: assertion `dest_width > 0' failed
** Message: using fallback from indicator to GtkStatusIcon

** (nm-applet:2128): WARNING **: Failed to register as an agent: (2) The name org.freedesktop.NetworkManager was not provided by any .service files
** Message: applet now embedded in the notification area
** Message: Starting applet secret agent because GNOME Shell disappeared

** (nm-applet:2128): WARNING **: Failed to register as an agent: (2) The name org.freedesktop.NetworkManager was not provided by any .service files

Daniil Ivanov (daniil-ivanov) wrote :

I was able to workaround the problem by changing "start on" condition in cat /etc/init/network-manager.conf to the following:

start on (started dbus
          or static-network-up)

I removel local-filesystems as dbus itselef starts on that signal and NetworkManager is useless without DBus.

Thomas Hood (jdthood) on 2012-06-21
summary: - NetworkManager is not running
+ After upgrade to 12.04 NetworkManager does not start automatically on
+ boot
Daniil Ivanov (daniil-ivanov) wrote :

Probably the real root-cause for this that static-network-up is not emitted anywhere
$ grep static-network-up /etc/init/*
failsafe.conf:stop on static-network-up or starting rc-sysinit
failsafe.conf: # these messages. currently only static-network-up counts for that.
networking.conf:emits static-network-up
network-interface.conf:emits static-network-up
network-manager.conf: or static-network-up)
procps.conf:start on virtual-filesystems or static-network-up
rc-sysinit.conf:start on (filesystem and static-network-up) or failsafe-boot

Instead "net-device-up IFACE=lo" is being emitted from network-interface.conf.

Daniil Ivanov (daniil-ivanov) wrote :

My issue is clearly connected to static-network-up not being emitted due to my network configuration.
There are quite a few bugs on this issue, for example bug 900903.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager (Ubuntu):
status: New → Confirmed
rhodes69 (rhodes69) wrote :

This bug also seen in Lubuntu 11.10 ---> 12.05 upgrade

kabandham (trebauchet1986) wrote :

In my case, commenting out the following lines in /etc/network/interfaces fixed this issue as well as the "Waiting for network configuration" message at startup..

auto dsl-provider
iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
provider dsl-provider

auto eth0
iface eth0 inet dhcp

Commenting out the last two lines alone did not help...

Phil Kalina (pkalina) wrote :

Thank you, Daniil Ivanov, for the work-around you suggest in comment 6. It works perfectly.

Daniil Ivanov (daniil-ivanov) wrote :

static-network-up is not emitted because there some "auto" interfaces in /etc/network/interfaces, which cannot be configured during startup.

Tomas Pospisek (tpo-deb) wrote :

I can confirm that the "auto" configuration items in /etc/network/interfaces cause the symptoms described here.

After commenting out all of the "auto" items in /etc/network/interfaces except for "auto lo", NetworkManager is starting again automatically.

Thanks Daniil for your research!

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

Other bug subscribers