Error:
"IMPORTANT: Do not ignore this email.
Your hostname (server.server.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 server.server.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.
Fix:
Here are the steps that you should work through to solve this issue.
1. Follow the instructions that cPanel has provided by checking to see if you can solve this issue using WHM provided tools. Login to your server's WHM (not cPanel) by going to https://[YOUR SERVER IP]:2087 in your web browser.
2. You probably see the error now, go ahead and close it for now and scroll down the left hand Functions Menu until you find the heading 'DNS Functions'. Click on 'Add an A entry for your hostname'. WHM will try to analyze your hostname and then present you with a button to click that says Add the entry, go ahead and click on that. WHM should automatically try to add the relevant A record for your hostname to the DNS zone present on your system.
3. Go ahead and logout and then log back in to WHM to see if the message returns. Look to the top of WHM to see the "Logout(root)" link. Optional Tip: If you don't like logging into and then out of WHM while testing the fixes you can instead login to your server via SSH and whenever you are ready to test simply run the following command:
root@myserver [~]# /scripts/ipcheck
This command will send you an email immediately if your settings are still incorrect.
4. Hopefully that worked, but if not, we should go ahead and edit your /etc/hosts file just in case. Login to your system via SSH. Use your favorite text editor to make sure that your /etc/hosts file looks something like this.
root@myserver [~]# cat /etc/hosts
127.0.0.1 localhost
xx.xx.xx.xx server.server.com server
If you would like more information on the structure of the hosts file type 'man hosts' as the structure of this file is outside of the scope of this document.
5. Use your preferred method of checking for the message again. Has it returned? Are you sure that your server is using the proper resolvers? Make sure that your /etc/resolv.conf has the following within.
nameserver X.X.X.X
nameserver X.X.X.X
Can include global NS as well
Let's go ahead and test for the message again. Did it return? In this case it sounds like the domain name servers for your domain are not configured to be this server. Is it possible that they are configured to be another server? We can use dig from within the shell to try and find out. Try this:
dig +noall +answer +additional mydomain.com NS
In the most simple of setups, the IPs listed in your results should match the IPs of your server. If they do, then everything should be working at this point. If not then you are using name servers that are not within your system and you will need to update them with the relevant A record.
"IMPORTANT: Do not ignore this email.
Your hostname (server.server.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 server.server.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.
Fix:
Here are the steps that you should work through to solve this issue.
1. Follow the instructions that cPanel has provided by checking to see if you can solve this issue using WHM provided tools. Login to your server's WHM (not cPanel) by going to https://[YOUR SERVER IP]:2087 in your web browser.
2. You probably see the error now, go ahead and close it for now and scroll down the left hand Functions Menu until you find the heading 'DNS Functions'. Click on 'Add an A entry for your hostname'. WHM will try to analyze your hostname and then present you with a button to click that says Add the entry, go ahead and click on that. WHM should automatically try to add the relevant A record for your hostname to the DNS zone present on your system.
3. Go ahead and logout and then log back in to WHM to see if the message returns. Look to the top of WHM to see the "Logout(root)" link. Optional Tip: If you don't like logging into and then out of WHM while testing the fixes you can instead login to your server via SSH and whenever you are ready to test simply run the following command:
root@myserver [~]# /scripts/ipcheck
This command will send you an email immediately if your settings are still incorrect.
4. Hopefully that worked, but if not, we should go ahead and edit your /etc/hosts file just in case. Login to your system via SSH. Use your favorite text editor to make sure that your /etc/hosts file looks something like this.
root@myserver [~]# cat /etc/hosts
127.0.0.1 localhost
xx.xx.xx.xx server.server.com server
If you would like more information on the structure of the hosts file type 'man hosts' as the structure of this file is outside of the scope of this document.
5. Use your preferred method of checking for the message again. Has it returned? Are you sure that your server is using the proper resolvers? Make sure that your /etc/resolv.conf has the following within.
nameserver X.X.X.X
nameserver X.X.X.X
Can include global NS as well
Let's go ahead and test for the message again. Did it return? In this case it sounds like the domain name servers for your domain are not configured to be this server. Is it possible that they are configured to be another server? We can use dig from within the shell to try and find out. Try this:
dig +noall +answer +additional mydomain.com NS
In the most simple of setups, the IPs listed in your results should match the IPs of your server. If they do, then everything should be working at this point. If not then you are using name servers that are not within your system and you will need to update them with the relevant A record.
No comments:
Post a Comment