SOLVED Hostname not resolving?

webtipster

Well-Known Member
Aug 27, 2016
56
8
58
Atlanta, GA
cPanel Access Level
Website Owner
Problem with the hostname not resolving at all. Not sure what has happened overnight but both servers do not respond to their hostname ie. WHM/cPanel is not accessible.

Server is UP and all services are running. However the server hostname cannot be accessed via URL at all.

Ran a DNS Stuff DNS check and everything resolves fine.

Checked /etc/sysconfig/network and hostname is listed.
Checked domain.db for the domain and everything looks fine ns1,ns2 etc are there.

Not sure what else to check?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello,

Can you successfully ping or use the "host" command with the hostname from your workstation? Do you notice any output to /usr/local/apache/logs/error_log when attempting to open the hostname as a URL in a web browser?

Thank you.
 

webtipster

Well-Known Member
Aug 27, 2016
56
8
58
Atlanta, GA
cPanel Access Level
Website Owner
Hi Michael,

Thank you on your prompt reply.

Ping returns: Ping request could not find host xxx.domainname.net. Please check the name and try again.
URL: This site can’t be reached. xxx.domainname.net’s server DNS address could not be found.

If I ping just the domain name (not hostname) I get successful reply and can access the URL through browser.

Any ideas?

Thanks in advance.
 

webtipster

Well-Known Member
Aug 27, 2016
56
8
58
Atlanta, GA
cPanel Access Level
Website Owner
Just a quick update forgot to check the host commands from the ssh:

If I run host -t CNAME xxx.domainname.net I get Host xxx.domainname.net not found: 3(NXDomain)
If I run host xxx, I get Host xxx not found: 3(NXDomain)

Thank you.
 

webtipster

Well-Known Member
Aug 27, 2016
56
8
58
Atlanta, GA
cPanel Access Level
Website Owner
Ok went back in and fixed it.

Deleted the DNS zone for domainname.net, logged in using server IP to WHM and re-created the DNS zone for domainname.net, double checked that hostname was correct, hostname IP was assigned, re-assigned it again, checked the correct A entries are there, cleaned DNS zones, synced DNS records, and voila back in in business.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
I'm happy to see the issue is now resolved. Thank you for updating us with the outcome.
 

David Colter

Active Member
Jun 30, 2016
40
10
8
USA
cPanel Access Level
Root Administrator
Deleted the DNS zone for domainname.net, logged in using server IP to WHM and re-created the DNS zone for domainname.net, double checked that hostname was correct, hostname IP was assigned, re-assigned it again, checked the correct A entries are there, cleaned DNS zones, synced DNS records, and voila back in in business.
Thank you for posting the steps you took to solve this. They are, rewritten:
  1. Deleted the DNS zone for domainname.net,
  2. Logged in using server IP to WHM,
  3. Re-created the DNS zone for domainname.net,
  4. Double checked that hostname was correct, hostname IP was assigned,
  5. Re-assigned it again,
  6. Checked the correct A entries are there,
  7. Cleaned DNS zones,
  8. Synced DNS records, and
  9. Voila back in in business
Would you be able to expound on where or how steps 2 & 5-8 were accomplished?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello @David Colter,

Logged in using server IP to WHM,
This simply implies accessing Web Host Manager directly over the IP address. EX:

Code:
https://$server-IP:2087
  • Re-assigned it again,
  • Checked the correct A entries are there,
  • Cleaned DNS zones,
  • Synced DNS records, and
DNS Zone modifications are possible via "WHM >> Edit DNS Zone". If you utilize a DNS cluster, you can force a synchronization of the changes via "WHM >> Synchronize DNS Records".

Thank you.