MihanServer.IR

مرکز آموزش

The hostname resolves to . It should resolve to X.X.X.X

"IMPORTANT: do not ignore this email: The hostname resolves to . It should resolve to X.X.X.X"

A newly setup cPanel system may have a message such as the following show the first time that you login to WHM.

 

===========

IMPORTANT: Do not ignore this email.

The hostname (hostname.server.com) resolves to . It should resolve to xx.xx.xx.xx. Please be sure to correct /etc/hosts as well as the 'A' entry in zone file for the domain.

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


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

===========

 

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 myserver.mydomain.com myserver

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 xxx.xxx.xxx.xxx note: Your Datacenter NameServer IP Address
nameserver xxx.xxx.xxx.yyy note: Your Datacenter NameServer IP Address

Though we understand that many users have custom configurations specified in /etc/resolv.conf, we would request that you temporarily change this information to the datacenter defaults while troubleshooting this issue. You can use the following commands.

cp /etc/resolv.conf /etc/resolv.conf.bak
echo -e 'nameserver xxx.xxx.xxx.xxx\nnameserver xxx.xxx.xxx.yyy' > /etc/resolv.conf

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

Here are some example results:

$ dig +noall +answer +additional your-datacenter.com NS
your-datacenter.com. 86382 IN NS pdns6.ultradns.co.uk.
your-datacenter.com. 86382 IN NS pdns4.ultradns.org.
your-datacenter.com. 86382 IN NS pdns2.ultradns.net.
your-datacenter.com. 86382 IN NS pdns1.ultradns.net.
your-datacenter.com. 86382 IN NS pdns5.ultradns.info.
your-datacenter.com. 86382 IN NS pdns3.ultradns.org.
pdns2.ultradns.net. 86103 IN A 204.74.109.1
pdns1.ultradns.net. 86103 IN A 204.74.108.1
pdns1.ultradns.net. 86103 IN AAAA 2001:502:f3ff::1
pdns6.ultradns.co.uk. 86275 IN A 204.74.115.1
pdns5.ultradns.info. 82929 IN A 204.74.114.1
pdns4.ultradns.org. 65318 IN A 199.7.69.1
pdns4.ultradns.org. 65318 IN AAAA 2001:502:4612::1
pdns3.ultradns.org. 65318 IN A 199.7.68.1

In the most simple of setups, the IPs listed in your results (not your-datacenter's) 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.

6. If you are using your-datacenter's name servers then login to our Portal and go to Public Network > dns and click to edit the domain in question. Simpy add an A record with your server's main IP Address into the fields. If you are using some other name servers, you will need to contact the Administrator of that system to ask how you may add additional DNS Records.

 



آیا این پاسخ به شما کمک کرد؟

افزودن به مورد علاقه ها افزودن به مورد علاقه ها

چاپ این مقاله چاپ این مقاله

خوانده شده
Howto Install FLv2Tool (مشاهدات: 189)
How To Prevent SSH Root Access (مشاهدات: 147)

Powered by WHMCompleteSolution

زبان:

منوی سریع

ورود کاربر

ایمیل

کلمه عبور

مرا به خاطر بسپار

جستجو