service fails to start/stop/restart networking daemon

Bug #440179 reported by Peter Belew
168
This bug affects 34 people
Affects Status Importance Assigned to Milestone
sysvinit (Ubuntu)
Fix Released
Medium
Clint Byrum
Nominated for Lucid by Simone F.

Bug Description

Binary package hint: sysvinit-utils

The 'service' program (in sysvinit-utils) fails to start, stop, or restart a daemon, as follows:

root@lightning:~# service networking restart
restart: Unknown instance:

It should have the same effect as the following:

root@lightning:~# /etc/init.d/networking restart
 * Reconfiguring network interfaces...

Ubuntu version and kernel version
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.10
DISTRIB_CODENAME=karmic
DISTRIB_DESCRIPTION="Ubuntu karmic (development branch)"
Linux lightning 2.6.31-11-generic #36-Ubuntu SMP Fri Sep 25 06:37:51 UTC 2009 i686 GNU/Linux
model name : VIA Samuel 2
cpu MHz : 798.000

This system was updated earlier today.

ProblemType: Bug
Architecture: i386
Date: Thu Oct 1 12:28:49 2009
DistroRelease: Ubuntu 9.10
Package: sysvinit-utils 2.87dsf-4ubuntu7
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-11.36-generic
SourcePackage: sysvinit
Uname: Linux 2.6.31-11-generic i686

Related branches

Revision history for this message
Peter Belew (peterbe) wrote :
Revision history for this message
Peter Belew (peterbe) wrote :

This problem occurs on both my test systems for Karmic, for all the alpha versions I've tried.

Revision history for this message
Gerry Reno (greno-verizon) wrote :

I am having this same problem in 9.10 server.

$ sudo service networking restart
restart: Unknown instance:

Revision history for this message
Aritra Dalal (aritra-dalal) wrote :

bump: this is still a problem...

Revision history for this message
Simone F. (fittabile) wrote :

I have the same mulfunctioning:

~$ sudo /etc/init.d/networking restart
 * Reconfiguring network interfaces... Ignoring unknown interface eth0=eth0.
Ignoring unknown interface iface=iface.
Ignoring unknown interface eth0=eth0.
Ignoring unknown interface inet=inet.
Ignoring unknown interface dhcp=dhcp.
                                                                                                                                       [ OK ]
~$ sudo service networking restart
restart: Unknown instance:
~$ sudo service networking stop
stop: Unknown instance:
~$ sudo service networking start
networking stop/waiting

Any ideas why netwroking seems not being compatible with sysinit service command?

Revision history for this message
Simone F. (fittabile) wrote :

And yes I am on Lucid! Testing it.

summary: - service fails to start/stop/restart a daemon
+ service fails to start/stop/restart networking daemon
Revision history for this message
carloslp (carloslp) wrote :

The same here. How is supossed that we can restart networking configuration???? Neither /etc/init.d/networking or stop networking works.

Revision history for this message
Jon Watte (5-launchpad-net-mindcontrol-org) wrote :

I am also stuck on this problem. I installed 10.04 LTS x64 in a basic (text mode) install on a VMWare vCenter virtual machine.
The initial machine works.
When I clone this machine, and boot the clone, the clone does not get working networking.
As part of trying to diagnose/fix this, I'm running into the same problem with cryptic error messages.

I *think* it has something to do with trying to run these commands while something in networking is still trying to start in the background, because waiting for five minutes and re-trying, I get another message (about eth0 not being a recognized interface)

Revision history for this message
Jon Watte (5-launchpad-net-mindcontrol-org) wrote :

More information. Apparently, the system has gotten into a confused state:

"initctl list | grep network" shows:
network-interface (lo) start/running
network-interface (eth1) start/running
network-interface-security start/running
networking stop/waiting

"ifup eth1" prints:
Ignoring unknown inteface eth1=eth1

"grep eth1 /var/log/boot" shows:
udev: renamed network interface eth0 to eth1

Again, this may be more of a cause than a symptom of the networking service refusing to start, and the error messages being really poor.
This is on 10.04 LTS x64 with a very basic text-mode install

Revision history for this message
Benji York (benji) wrote :

I'm seeing the same symptoms as Jon Watte in a clone of a KVM VM running 10.04. The original VM works fine.

Revision history for this message
bernstein (bernstein) wrote :

Seeing the same as Simone F. in #5 (note: /etc/init.d/networking start does work)

Seeing output of "initctl list | grep network" as Jon Watte (#9) ... but not the other things (e.g. ifup workin as expected. nothing in /var/log/boot)

meanwhile starting/stopping each interface manually as follows works too :
sudo service network-interface stop INTERFACE=lo

so i guess using the service command invokes another (broken) script than /etc/init.d/networking which works fine. this really shouldn't happen on a lts release

Revision history for this message
flickerfly (josiah-ritchie) wrote :

I'm also seeing this with several guest machines that I moved to a different host. I change the networking config and then this started to occur. I removed two NICs and added a new one. It currently has only one NIC. This was needed for virt-manager to associate the guest with the proper network on the host. After getting the message I modified /etc/networking/interfaces and /etc/udev/rules.d/70-persistent-net.rules to get my NIC working as expected, but the errors still show up.

'/etc/init.d/networking restart' works

'service networking restart' does not work. It simply fails with the "Unknown instance:" message.

If I run 'initctl list | grep network' I see only the current interfaces, but I see a line that says "networking stop/waiting" so I think this confirms Watte's assumption that those results were a symptom, not cause.

Changed in sysvinit (Ubuntu):
status: New → Confirmed
Revision history for this message
phazei (phazei) wrote :

I have this issue as well
Ubuntu Server 10.10

/etc/init.d/networking restart -- works

service networking restart -- unknown instance

Revision history for this message
Juan Simón (simonbcn) wrote :

Any solution to this?

Revision history for this message
ambar (ambseks) wrote :

I have this problem as wekk. Ubuntu 10.10 (Desktop).

Revision history for this message
Helge Willum Thingvad (helgesdk) wrote :

Same issue here with OpenSSH (sudo service ssh ...), running Ubuntu Server 10.04 on a VM.
Using /etc/init.d/ssh ... instead

Revision history for this message
Jeffrey Wildman (jeffrey-wildman) wrote :

Running Ubuntu Server 64-bit 11.04. Same issue with the idmapd service when calling:

service idmapd restart

Revision history for this message
Jeffrey Wildman (jeffrey-wildman) wrote :

I submitted a question on this to source package upstart. The problem seems to stem from 'service' using the upstart command 'restart' whose documentation states (man restart):

>>>Note that this command can only be used when there is an instance of JOB, if there is none then it returns an error instead of starting a new one<<<

https://answers.launchpad.net/ubuntu/+source/upstart/+question/173604

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Seems like the 'service' command should be smarter, and map to the "sysvinit" way in the same way that invoke-rc.d does for packages. restart is usually expected to start the service if it isn't started, but by passing directly through to upstart's restart, we are breaking that assumption, leading to all sorts of problems for people.

Changed in sysvinit (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Changed in sysvinit (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Clint Byrum (clint-fewbar)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sysvinit - 2.88dsf-13.10ubuntu5

---------------
sysvinit (2.88dsf-13.10ubuntu5) precise; urgency=low

  * d/service/service: Updated to use 'stop/start' instead of passing
    restart directly through to upstart. (LP: #440179)
  * d/service/service.8: Updated man page to reflect handling of upstart
    jobs.
 -- Clint Byrum <email address hidden> Tue, 15 Nov 2011 12:33:01 -0800

Changed in sysvinit (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
asari (asari-users) wrote :

I still have the same problem on Precise:

$ sudo service networking restart
stop: Unknown instance:
networking stop/waiting

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise

$ uname -a
Linux ubuntu12 3.2.0-25-generic-pae #40-Ubuntu SMP Wed May 23 22:11:24 UTC 2012 i686 i686 i386 GNU/Linux

$ dpkg -l sysvinit\* | grep sysvinit
un sysvinit <none> (no description available)
ii sysvinit-utils 2.88dsf-13.10u System-V-like utilities

Changed in sysvinit (Ubuntu):
assignee: Clint Byrum (clint-fewbar) → Girish Sanenahalli (girish-cs7036)
Changed in sysvinit (Ubuntu):
assignee: Girish Sanenahalli (girish-cs7036) → Clint Byrum (clint-fewbar)
Revision history for this message
Kris Lindgren (kris-lindgren) wrote :

I am also still having this issue as well:

$ service networking restart
stop: Unknown instance:
networking stop/waiting

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise

$ dpkg -l sysvinit\* | grep sysvinit
un sysvinit <none> (no description available)
ii sysvinit-utils 2.88dsf-13.10ubuntu11.1 System-V-like utilities

Revision history for this message
KOMATSU Seiji (comutt) wrote :
Download full text (5.0 KiB)

I'm also still stuck on this problem.
Only way to stop networking that works on 12.04.2 LTS is /etc/init.d/networking.
Restarting networking is also done only by /etc/init.d/networking.

skomatsu@tokito:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise

skomatsu@tokito:~$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 08:00:27:62:08:36
          inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe62:836/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:53193 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30937 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:76448766 (76.4 MB) TX bytes:2160269 (2.1 MB)

skomatsu@tokito:~$ sudo /etc/init.d/networking restart
 * Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
 * Reconfiguring network interfaces...
ssh stop/waiting
ssh start/running, process 16511
   ...done.

skomatsu@tokito:~$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 08:00:27:62:08:36
          inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe62:836/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:53202 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30952 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:76451045 (76.4 MB) TX bytes:2162258 (2.1 MB)

skomatsu@tokito:~$ sudo restart networking
restart: Unknown instance:
skomatsu@tokito:~$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 08:00:27:62:08:36
          inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe62:836/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:53203 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30954 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:76451135 (76.4 MB) TX bytes:2162418 (2.1 MB)

skomatsu@tokito:~$ sudo stop networking
stop: Unknown instance:
skomatsu@tokito:~$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 08:00:27:62:08:36
          inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe62:836/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:53203 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30954 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:76451135 (76.4 MB) TX bytes:2162418 (2.1 MB)

skomatsu@tokito:~$ sudo service networking restart
stop: Unknown instance:
networking stop/waiting

skomatsu@tokito:~$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 08:00:27:62:08:36
          inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe62:836/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          ...

Read more...

Revision history for this message
KOMATSU Seiji (comutt) wrote :

I've missed writing sysv-rc and sysvinit-utils version.

$ dpkg -l | grep sysv
ii sysv-rc 2.88dsf-13.10ubuntu11.1 System-V-like runlevel change mechanism
ii sysvinit-utils 2.88dsf-13.10ubuntu11.1 System-V-like utilities

Revision history for this message
Yufei (yufei) wrote :

It seems Ubuntu want us to use network-interface to bring up/down the interface, i wonder:

after my some tests:

we can use these commands to bring up/down the network INTERFACE, and not the whole networking service.

restart network-interface INTERFACE=eth0
ifdown eth0; ifup eth0 (your own risk if you can not login your server again)

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hi Yufei, thanks for your concerns. Hoever, this is not the appropriate bug to comment on as it has been marked released for a long time, and is probably not relevant to current versions of Ubuntu. If you are experiencing an issue with networking, you should file a new bug against the ifupdown package.

Revision history for this message
A (publicface) wrote :

lsb_release -a
LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch:cxx-3.0-ia32:cxx-3.0-noarch:cxx-3.1-ia32:cxx-3.1-noarch:cxx-3.2-ia32:cxx-3.2-noarch:cxx-4.0-ia32:cxx-4.0-noarch:desktop-3.1-ia32:desktop-3.1-noarch:desktop-3.2-ia32:desktop-3.2-noarch:desktop-4.0-ia32:desktop-4.0-noarch:graphics-2.0-ia32:graphics-2.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch:graphics-3.1-ia32:graphics-3.1-noarch:graphics-3.2-ia32:graphics-3.2-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-3.2-ia32:printing-3.2-noarch:printing-4.0-ia32:printing-4.0-noarch:qt4-3.1-ia32:qt4-3.1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 12.04.3 LTS
Release: 12.04
Codename: precise

service networking restart
stop: Unknown instance:
networking stop/waiting

uname -a
Linux ubuntu.redacted.com 3.2.0-56-generic-pae #86-Ubuntu SMP Wed Oct 23 17:51:27 UTC 2013 i686 i686 i386 GNU/Linux

dpkg -l sysvinit\* | grep sysvinit
un sysvinit <none> (no description available)
ii sysvinit-utils 2.88dsf-13.10ubuntu11.1 System-V-like utilities

/etc/init.d/networking restart
 * Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
ssh stop/waiting
ssh start/running, process 9114
<<<<<<<<< HANGS >>>>>>>>>>>>

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

Other bug subscribers

Remote bug watches

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