Do you have IPV6 'enabled' on your system? I.E: does
'/sbin/ifconfig -a|grep inet6' return anything? If you don't need IPV6 and
disabled it, perhaps your issue would go away...
One thing we use here to make it quicker to 'escape' a down'ed nameserver
is to put this at the top of your /etc/resolv.conf:
--------------- CUT ---------------
options timeout:2 attempts:2
--------------- CUT ---------------
My 2c..
Vincent
On Tue, 15 Jun 2010, Dag Wieers wrote:
Hi,
We have a strange problem that I never experienced before and cannot explain,
but doesn't seem to be the right behavior nevertheless.
When you resolve a hostname on RHEL5 (RHEL4 is affected too) that is in
/etc/hosts, libresolv performs a DNS lookup. If your DNS is unavailable for
whatever reason, it takes a long timeout for DNS before it returns the answer
from /etc/hosts...
This is easy to verify:
- Add a fake name to /etc/hosts
1.2.3.4 testsys
- Make sure /etc/nsswitch.conf has
hosts: files dns
- Add a non-working DNS server at the top of /etc/resolv.conf
nameserver 4.3.2.1
- Perform a namelookup and see that it times out
getent hosts testsys
getent hosts 1.2.3.4
- Verify that a namelookup is not performed when doing
getent hosts
Even when you configure /etc/nsswitch to do:
hosts: files [SUCCESS=return] dns
it fails to work as we would expect. What am I not understanding ?
From stracing the getent lookups it is clear it opens /etc/hosts first
then does a DNS lookup and then opens /etc/hosts again before printing the
answer.
Does anyone know what is going on ?
Thanks in advance,
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list