Here is a situation when I do
root@skd:~# service networking restart
restart: Unknown instance:
and when I do
root@skd:~# service networking stop
stop: Unknown instance:
now if I do
/etc/init.d/networking stop
* Deconfiguring network interfaces... Ignoring unknown interface eth1=eth1.
[ OK ]
note above I did not used service command and it shows working.
and now if I start it in same way I get a warning.
/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
In any case either service
command or using /etc/init.d/networking
with restart does not do any thing.
It does not work and neither does it start.Is it ia problem with Ubuntu 10.04 that service utility does not work properly?
I digged a bit more into this problem and found following two commands will help you to find what is active on your system.
(status is short for "initctl status") or
In my case it was the second command of above
Once you determine which one's active (whichever applies):
(restart is short for "initctl restart") or
both are different.So if I restart networking it wont have any effect as network-manager is active.Files worth looking are /etc/init (this is different from init.d)
Ubuntu 10.04 uses the upstart system for the network startup scripts, so
restart networking
theoretically should be the restart method. BUT it does not seem to work./etc/init.d/networking stop; /etc/init.d/networking start
does work. (From this thread, the problem appears to be upstart's need for some sort of process to grab on to - http://osdir.com/ml/ubuntu-users/2009-11/msg03490.html)From the error shown with the start, I think you may have a typo in /etc/network/interfaces. See this link for info on setup of the file:
https://help.ubuntu.com/10.04/serverguide/C/network-configuration.html#static-ip-addressing
See the interfaces man page for a full breakdown of options. Once that error is not present when you run a startup, you should be good.
Another option is to use ifdown and ifup for restarting interfaces. So something like:
Or if your currently using SSH it's probably a good idea to use nohup so it completes the restart even if SSH drops: