HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Ubuntu 10.04 - /etc/init.d/hostname restart - Issue (http://www.howtoforge.com/forums/showthread.php?t=47382)

GaryL 16th July 2010 18:33

Ubuntu 10.04 - /etc/init.d/hostname restart - Issue
 
Hi all,

I'm pretty new to the site. I was following the "The Perfect Server - Ubuntu 10.04 [ISPConfig 3]" howto and I've become stuck at Step 7 - Configure The Network.

When I run /etc/init.d/hostname restart, I get the following message:

Rather than invoking init scripts through /etc/init.d/, use the service utility, e.g. service hostname restart

Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the restart utility, e.g. restart hostname
hostname stop/waiting



But when I run either service hostname restart or restart hostname I get the response:
restart: Unknown instance:

Any idea what’s gone wrong?

My full hostname is in the following format vm-svr-mail.mydomain.co.uk, but I've also tried mail.mydomain.co.uk as I thought the issue might be with multiple hyphens, but I still get the same result.


Many Thanks

falko 17th July 2010 14:22

Quote:

Originally Posted by GaryL (Post 233978)
When I run /etc/init.d/hostname restart, I get the following message:

Rather than invoking init scripts through /etc/init.d/, use the service utility, e.g. service hostname restart

Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the restart utility, e.g. restart hostname
hostname stop/waiting



But when I run either service hostname restart or restart hostname I get the response:
restart: Unknown instance:

Any idea what’s gone wrong?

You can ignore this warning - just run
Code:

/etc/init.d/hostname restart
and you should be fine.

unsichtbare 25th July 2010 00:35

I too am having this issue. Running '/etc/init.d/hostname restart' simply produces the annoying warning quoted above, doesn't restart the service. Even after a full reboot, running:

Code:

root@webserver:~# hostname
webserver.classroom100.com
root@webserver:~# hostname -f
hostname: Name or service not known
root@webserver:~#

-J

unsichtbare 25th July 2010 01:31

Solved > I forgot to include the shortname portion in the /etc/hosts eg.

192.168.100.100 webserver.classroom100.com webserver


All times are GMT +2. The time now is 19:59.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.