Ubuntu 10.04 - /etc/init.d/hostname restart - Issue

Discussion in 'HOWTO-Related Questions' started by GaryL, Jul 16, 2010.

  1. GaryL

    GaryL New Member

    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
    Last edited: Jul 16, 2010
  2. falko

    falko Super Moderator ISPConfig Developer

    You can ignore this warning - just run
    /etc/init.d/hostname restart
    and you should be fine.
  3. unsichtbare

    unsichtbare Member HowtoForge Supporter

    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:

    [email protected]:~# hostname
    [email protected]:~# hostname -f
    hostname: Name or service not known
    [email protected]:~#
  4. unsichtbare

    unsichtbare Member HowtoForge Supporter

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

Share This Page