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

I keep getting an error message whenever doing anything that requires a dns lookup on my centos server. For example:

[root@15557 etc]#  wget http://www.whitehouse.gov/sites/default/files/rss_viewer/birth-certificate-long-form.pdf
--2011-05-03 20:55:35--  http://www.whitehouse.gov/sites/default/files/rss_viewer/birth-certificate-long-form.pdf
Resolving www.whitehouse.gov... failed: Temporary failure in name resolution.
wget: unable to resolve host address `www.whitehouse.gov'

If i restart the server then this problem goes away for a SHORT time, but it always comes back after an hour or so. If i change the nameserver ip's listed in resolv.conf, the problem is not fixed, even if i substitute them with common nameserver like google's If i flush the hosts cache after changing resolve.conf, it does not fix the problem either. After restart of the server, the resolv.conf is changed back to it's default values, i guess by some dhcp.

Please help, this is incredibly frustrating and basically makes the server useless. There must be some problem. Thanks.

share|improve this question
Any outbound packet loss on your server? I'd fire up a packet sniffer and see what the DNS traffic looks like when this happens. –  EEAA May 4 '11 at 4:09
Can you recommend a packet sniffer? I haven't installed such a software before. Thanks. –  whitelines222 May 4 '11 at 4:10
tcpdump is readily availalble in most distros via their package repository. I'd recommend googling around for a tcpdump tutorial before getting started, though. Also, you can use tcpdump to capture the packets and write them to a log file, then you can open up that log file in a GUI tool called Wireshark, which is a bit more user-friendly than using the CLI. –  EEAA May 4 '11 at 4:13
tcpdump -Ani <your_interface> -s0 port domain (-w my.log &) –  3molo May 4 '11 at 7:45

1 Answer 1

This might be a problem caused by DHCP server -actually, by a rogue or another misconfigured DHCP server on your network.

Probably, this is what happens: when your server boots, it manages to get the accurate parameters (IP address, gateway, DNS servers, etc) from the legit DHCP server and as a result, you won't experience any problems until the lease renewal. After a relatively short period of time (it depends on dhcp client and server configuration), the DHCP client will attempt to renew the lease, by contacting the legit DHCP server (via unicast transmission). If this for some reason fails or your dhcp client for some reason doesn't get a response from the legit DHCP server, it will get into rebinding state and will broadcast a request to extend the lease time. If the rogue/another misconfigured DHCP server manages to respond first, it might send to your DHCP client inacurate parameters -for example a "wrong" DNS server address, and as a result you won't be able to resolve hostnames.

If my speculation is right, rebooting your server does not always solve the problem, since there might be times when the rogue DHCP server responds first, and as a result you experience the problem you mentioned.

In any case, try configuring static IP addresses, disabling DHCP and setting manually DNS servers. Also you should probably check if any other DHCP servers are running on your network, besides the one you're using.

share|improve this answer

Your Answer


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.