Name resolution with no nameserver indicated
I have a RHEL cluster -- and no /etc/resolv.conf file and only an /etc/hosts file for name resolution. The /etc/nsswitch.conf file has the hosts line --> hosts files dns. This seems to be as expected -- however, on 'nslookup', I can try to resolve a hostname that is defined in my hosts file yet I get ";; connection timed out; no servers could be reached".
There should not be an attempt to query a nameserver as one is not defined -- I have checked the IPTABLES and they are off on one server and on on a few others -- yet the result is consistently the same. I am able to successfully ping/telnet/SSH from all the nodes defined in the /etc/hosts file -- it is just that the 'nslookup' command fails. Any ideas? Thanks! Dan |
Hi, welcome to LQ,
That will be because it's explicitly programmed to query DNS servers over a network interface. Same for the program host. "Name resolution" via "gethostbyname" or "gethostbyaddr" will work quite happily with what's defined in nsswitch.conf; nslookup and host won't. Cheers, Tink |
Tinkster,
Thanks very much for the tip -- looks like a little 'gotcha' from RHEL got me. :) Tip o'my hat to ya, Dan |
All times are GMT -5. The time now is 07:06 PM. |