No way to stop/start networking without network management

Bug #663352 reported by Tong Sun
76
This bug affects 14 people
Affects Status Importance Assigned to Milestone
ifupdown (Ubuntu)
Fix Released
High
Stéphane Graber
Precise
Won't Fix
Medium
Unassigned

Bug Description

Hi,

Converted from question to bug, from
https://answers.launchpad.net/ubuntu/+source/gnome-nettool/+question/130070

I want to remove all network management related packages and keep only a dhcp client (preferably pump). In plain Debian, I just need to properly config /etc/network/interfaces, then

 /etc/init.d/networking restart

Vola, I'm done. But there is no way in Ubuntu to stop/start networking.

/etc/init.d/networking restart
 * Reconfiguring network interfaces...
Operation failed.
^^^^^^^^^^^^^^^^^^^^^
ssh stop/waiting
ssh start/running, process 19500
                                                                         [ OK ]

At some previous moments, it was working before, and I cannot bring the networking to a full stop then start again.

Reposting comments from other bug reports, because I'm still getting the same results in Ubuntu 10.10 Maverick.

=== From https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/430883

. . . There is no way to stop/start a [networking] service:

root@quimerix:~# status networking
networking stop/waiting
root@quimerix:~# start networking
networking stop/waiting
root@quimerix:~# stop networking
stop: Unknown instance:
root@quimerix:~# stop networking
stop: Unknown instance:
root@quimerix:~# start networking
networking stop/waiting

?????????

And the old but working /etc/init.d says

root@quimerix:~# /etc/init.d/networking start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service networking start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start networking
networking stop/waiting

So explain me how its supossed that i can restart a [networking] service?

=== From https://bugs.launchpad.net/ubuntu/+source/netbase/+bug/492160

. . . I cannot start my network:

$sudo service networking restart
restart: Unknown instance

$sudo service networking start
networking stop/waiting

$sudo /etc/init.d/networking restart

(ifconfig does not show eth0 interface)

$ping www.google.com
ping: unknown host www.google.com

$sudo ifup eth0
(ping works)

Bottom line: No configuration will automatically start the network--I have to manually run "ifup" to get the network to start.

Related branches

Revision history for this message
Tong Sun (suntong001) wrote :

I meant, without network-manager

affects: gnome-nettool (Ubuntu) → ubuntu
Revision history for this message
Tong Sun (suntong001) wrote :

Are you sure?

bug #207869, is all about removal of duplicate songs, and package rhythmbox; whereas this is ubuntu networking? Seems entirely different things to me.

What's your justification concluding this is a duplicate of bug #207869?

thx

Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage. I have classified this bug as a bug in upstart.

When reporting bugs in the future please use apport, either via the appropriate application's "Help -> Report a Problem" menu or using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

affects: ubuntu → upstart (Ubuntu)
Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Bug 644175 is related to this issue also. It seems that if network-manager package is purged, wicd can not be used with wireless.

Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

Changed in upstart (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Steve Langasek (vorlon) wrote :

Reassigning to the ifupdown package. This should be supported by running 'service networking restart', but doesn't because /etc/init/networking.conf doesn't contain a stop command.

affects: upstart (Ubuntu) → ifupdown (Ubuntu)
Changed in ifupdown (Ubuntu):
status: Triaged → Invalid
status: Invalid → Triaged
Revision history for this message
Tong Sun (suntong001) wrote : Re: [Bug 663352] Re: No way to stop/start networking without network management

On Sat, Feb 12, 2011 at 5:34 PM, Steve Langasek <
<email address hidden>> wrote:

Reassigning to the ifupdown package. This should be supported by
> running 'service networking restart', but doesn't because
> /etc/init/networking.conf doesn't contain a stop command.
>

Just for the archive, the problem is more than just a stop command -- the

/etc/init.d/networking restart

is not merely stop and start. restart let you keep you current ssh
connection, while stop and start will loose it.

Revision history for this message
uniomni (ole-moller-nielsen) wrote :

This bug also affects us on a Ubuntu 11.04 (64 bit) cluster
Here are some examples:

root@alamba:/client_filesystems/shared/home/install# service networking stop
stop: Unknown instance:
root@alamba:/client_filesystems/shared/home/install# service networking restart
restart: Unknown instance:
root@alamba:/client_filesystems/shared/home/install# service networking start
networking stop/waiting
root@alamba:/client_filesystems/shared/home/install# service networking stop
stop: Unknown instance:

If I use the (now deprecated?) init.d I get this:

 root@alamba:/client_filesystems/shared/home/install# /etc/init.d/networking restart
 * Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
 * Reconfiguring network interfaces...

root@alamba:/client_filesystems/shared/home/install# /etc/init.d/networking start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service networking start

root@alamba:/client_filesystems/shared/home/install# /etc/init.d/networking stop
 * not deconfiguring network interfaces: network file systems still mounted.

The last error message is the first that might give me a hint that something else is happening, but it still looks like the original bug remains i.e. that the services networking command does not have restart and stop implemented.

Revision history for this message
David Favor (davidfavor) wrote :

This is a very bag bug.

It still persists and the last update was made 4 months ago.

Be great to have someone assigned to fix this bug and an update about workarounds.

Revision history for this message
KevDog (kev-hilton) wrote :

I had the same bug, but my work around was the following:

Manually take down your listening interfaces.
My interface was eth0 (yours might be wlan0, br0, or something else. ifconfig usually lists only listening interface).
sudo ifconfig <interface name> down -- for me this would be written sudo ifconfig eth0 down.

I then could restart the networking service
sudo /etc/init.d/networking restart

Everything worked after I took the interface down manually.

Changed in ifupdown (Ubuntu):
status: Triaged → Fix Committed
assignee: nobody → Stéphane Graber (stgraber)
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.5 KiB)

This bug was fixed in the package ifupdown - 0.7ubuntu1

---------------
ifupdown (0.7ubuntu1) quantal-proposed; urgency=low

  * Resynchronise with Debian experimental. Remaining changes:
    (LP: #298488, LP: #663352)
    - ifupdown.nw: Use 100 as default route metric unless an explicit metric
      parameter is set in /etc/network/interface.
    - If the /etc/NetworkManager/NetworkManager.conf file is present
      but doesn't have the "ifupdown:managed" the previous upload instructed
      the iniparser to return -1, which evaluates to TRUE. We instead instruct
      it to return 0, as we shouldn't prevent ifupdown from managing the
      interfaces in that case, as NM won't either. (LP: #281984)
    - debian/postinst: If the loopback interface is missing from the config
      in /etc/network/interfaces, add it on upgrade.
    - Add jobs and hooks for upstart.
  * Cherry-pick commit 011d5904c09d from upstream, fixing cases where the
    error messages wouldn't be triggered (caused test failure).
  * Cherry-pick commit 7c1a226cc995 from upstream, adds support for two
    options on dhcpv6 (accept_ra and autoconf) (LP: #1013597)
  * Cherry-pick commit 5af7e814faee from upstream, fixing a failure in the
    example script generate-interfaces.pl (LP: #286808)
  * Cherry-pick commit a1f8efc4d93f from upstream, add --no-scripts as a
    parameter to ifup/ifdown, allowing the user to bypass the the scripts
    in /etc/network/if-*.d/ (LP: #258782)

ifupdown (0.7) unstable; urgency=low

  * Accept duplicate options in /etc/network/interfaces, join them using
    a newline as a delimiter.
  * If an interface isn't defined, but mentioned in auto or allow statement,
    don't mention it in ifquery output.
  * Change shortcut for --exclude to -X (was -e previously).
  * Make ifquery return false if the interface isn't defined.
  * Fix typos in the changelog.
  * Calculate broadcast address internally.
  * Allow concurrent netmask specification in both address (using CIDR
    notation) and netmask for IPv6 (Closes: #674775).
  * Add preferred-lifetime setting for IPv6.
  * Pass -w and -e options to sysctl so we still can configure an interface
    even if IPv6 SLAAC options can't be set for some reason.
  * Port to GNU/Hurd (thanks to Svante Signell, closes: #296115).
  * Chdir to root when executing external programs (Closes: #361964).
  * Remove updetach from PPP method (Closes: #675016).
  * Configure hotplug interfaces only if they're running (thanks to Evgeni
    Golov, closes: #673658).
  * Rewrite NEWS file (Closes: #673688).
  * Update examples (Closes: #340992).
  * Update tests.
  * Update README.

ifupdown (0.7~rc3) unstable; urgency=low

  * Upload to unstable.
  * Don't refer to README from netbase any more.
  * Internal changes:
    - Make set_variable() able to set variables conditionally.
    - Improve conversions interface.
    - Add some support for interface link configuration.
    - Don't leak memory in some functions.
  * Configure VLANs automatically (Closes: #520436).
  * Calculate netmask internally, so even if a user haven't supplied
    one or have used CIDR notation, hook scripts will have it properly
    specified in IF_NE...

Read more...

Changed in ifupdown (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Timur Alperovich (timur-alperovich) wrote :

I realize this has been closed, however the fix never made it into Precise LTS release. Are there plans to backport the fix to the LTS release and is there some time estimate on that?

Revision history for this message
Chris J Arges (arges) wrote :

I still seem to be affected by this for Precise.

Changed in ifupdown (Ubuntu Precise):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in ifupdown (Ubuntu Precise):
status: New → Confirmed
Revision history for this message
Amber (amber-c) wrote :

I've recently created a VM running ubuntu server 12.04. I've configured the networking with a static IP. For some reason the networking says " networking stop/waiting". I then manually input the IP with the netmask as well at the default gateway and then issue a "sudo /etc/init.d/networking restart" and the network comes up and I am able to ping the gateway as well as the outside. Unfortunately this doesn't stay and eventually it disconnects from the network and changes my IP .

my /etc/network/interfaces is configured as follows

#The loopback network interface
auto lo
iface lo inet loopback

#the primary network interface
auto eth0
iface eth0 inet static
address x.x.x.x
netmask x.x.x.x
gateway x.x.x.x

Is there a reason why the server is changing the network as if its set to dhcp when i set the interface statically?

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

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in ifupdown (Ubuntu Precise):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

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