3

I moved my WHM/cPanel installation to a new server. After changing the nameserver IP's and then after a little while the domains to started pointing to the new server.

However the hostname doesn't resolve to an IP address.

/scripts/ipcheck --verbose


IMPORTANT: Do not ignore this email.

Your hostname (xxx.example.com) could not be resolved to an
IP address. This means that /etc/hosts is not set up correctly,
and/or there is no dns entry for xxx.example.com. Please be
sure that the contents of /etc/hosts are configured correctly, and
also that there is a correct 'A' entry for the domain in the zone
file.

Some or all of these problems can be caused by /etc/resolv.conf
being setup incorrectly. Please check that file if you believe
everything else is correct.

You may be able to automatically correct this problem by using the
'Add an A entry for your hostname' option under 'Dns Functions' in
your Web Host Manager.

I ran:

nano /etc/hosts


# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
XXX.XXX.XXX.XXX         xxx.example.com xxx

I also check:

nano /etc/resolv.conf

nameserver 8.8.8.8
nameserver 8.8.4.4

Also:

nano /etc/nameserverips

XXX.XXX.XXX.XXX=ns1.example.com
XXX.XXX.XXX.XXX=ns2.example.com

I checked the "Add an A Entry for your hostname" in WHM:

Hostname | Server Main IP
xxx.example.com | XXX.XXX.XXX.XXX

I checked and rebuilt dnsconfig

/scripts/rebuildingdnsconfig

I am really not sure what else to check, i have rebooted the server. The domains pointing to the name servers work fine. THe problem i am having is i route all cpanel access and SSL configs for the emails through https://xxx.example.com because this has the SSL cert. I have compared the settings to the older server and they are the same except the IP address.

Centos 6.4 WHM 11.40.0 Build 19

  • XXX.XXX.XXX = Server IPs
  • xxx.example.com = hostname

Any help would be appreciated.

Keelan
  • 325
  • 1
  • 4
  • 12
  • You nameserver for domain example.com are on same server? Are XXX.XXX.XXX.XXX=ns1.example.com XXX.XXX.XXX.XXX=ns2.example.com and XXX.XXX.XXX.XXX it's on your server? If you edit zona A for ("Add an A Entry for your hostname" ) but your nameserver are not on server, and not proper configured, nameserver point to other IP – abkrim Oct 23 '15 at 06:51

2 Answers2

2

Solved this:

Go to WHM, "add an entry for your hostname" and just submit again.

Even though it was correct submitting it again worked. This fix came from cPanel support.

Keelan
  • 325
  • 1
  • 4
  • 12
  • 1
    Thank you very much Keelan! You've saved me more panic tonight at 3am. Had to migrate a few clients in the past week and noticed their sites have been offline several hours ago. Best wishes! – CodeUK Sep 25 '20 at 02:19
0

I know its an old post, but here are a few checkpoints in addition to above if someone might need help in future with similar issue:

1> Check the content of

/etc/wwwacct.conf

2> Investigate your hostname & NS for proper results

dig ns1.example.com
dig hostname.exmple.com
host ns1.example.com
host (HOST IP)
nslookup hostname.exmple.com

3) Make sure you have registered your hostname.example.com and ns1.example.com at your domain registrar and they are pointing to right IP.

4) Ensure that no firewall is blocking port UDP:53 and others essential ports.

Amar Pratap
  • 1,000
  • 7
  • 20