Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I setup new server on centos 5.3 and configure dns and hostnam using WHM.

I also register my new nameservers with my domain registrar with ns1.example.com and ns2.example.com.

But i am unable to ping hostname and NS. ping pc2.example.com or ping ns1.example.com

I received the below email from server.

IMPORTANT: Do not ignore this email.

Your hostname (pc2.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 pc2.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.

When I issue the command

root@pc[~]# host pc2.example.com

I receive the below error that

Host pc2.example.com not found: 3(NXDOMAIN)

I added A entries for hostname and Nameservers but nothing replies.

Its almost more than 72 hours for setting & registering nameservers and dns configurations.

thanks,

share|improve this question
add comment

1 Answer

You need to do like what has been suggested in the email you received. First, you need to make sure you have a correct A record for your hostname in your DNS server. If you have done that successfully, you probably need to look at your /etc/resolv.conf file to make sure it lists your DNS servers IPs.

Second, you can add a line in /etc/hosts file to this hostname pc2.example.com.

You can try to request the name resolution from your DNS server using the command:

$ dig @your.dns.server.ip pc2.example.com
share|improve this answer
    
this command giving my hostname & NS A entries with success. then where is the issue?? –  Master-Man Sep 9 '12 at 9:00
    
@Master-Man: Did you check the /etc/resolv.conf file? –  Khaled Sep 9 '12 at 9:22
    
resolv.conf shows the below: root@pc1 [~]# cat /etc/resolv.conf search privatedns.com nameserver 70.38.0.4 nameserver 70.38.0.3 –  Master-Man Sep 9 '12 at 9:48
    
@Master-Man: Are these your DNS servers? –  Khaled Sep 9 '12 at 10:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.