The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Hostname Changing Back after Reboot

Discussion in 'General Discussion' started by frenziedfox, May 16, 2010.

  1. frenziedfox

    frenziedfox Member

    Joined:
    Mar 9, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    A while back I had an issue where the server hostname had been set as one of the user domains and it caused some mail routing issues. It seems the problem has come back to haunt me.

    Every time the server is rebooted it resets the hostname back to the wrong domain.

    If I correct it in WHM 'Change Hostname' it puts the correct entries in /etc/hosts and /etc/sysconfig/network as you'd expect.

    But after a reboot the hostname has changed back to the wrong one in all the above files and in WHM!

    I can't figure out where it is getting this from!

    any ideas?

    thanks,

    Alex
     
  2. WiredTree Joe

    WiredTree Joe Well-Known Member
    PartnerNOC

    Joined:
    Dec 13, 2006
    Messages:
    68
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Chicago, IL
    Is your server a VPS? If you don't change the hostname on the parent hardware node, it will get reset back to the old on reboot in most cases. If it is a VPS, have your provider make the hostname change for you on the parent node so it stays how you want it through reboots.
     
  3. frenziedfox

    frenziedfox Member

    Joined:
    Mar 9, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Hi Joe,

    Thanks for your reply. Yes, it's running in a Xen virtual environment.

    I had considered this may be the case, however it let me change the hostname to the wrong one in the first place a couple of months back, it's just now that it won't let me change it back for some reason!

    I'll contact the hosts, I suppose it's possible they have changed the config?

    In the meantime I have got around it by doing a chattr +i to /etc/hosts and /etc/sysconfig/network

    thanks,

    Alex
     
  4. frenziedfox

    frenziedfox Member

    Joined:
    Mar 9, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Just a quick update... it was indeed a setting on the control panel page provided by our hosts that was resetting the hostname. It was taking the hostname from a reverse DNS setting that I had overlooked!

    Problem now solved.

    Thanks again for your assistance.

    Alex
     
Loading...

Share This Page