Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-04-2009, 02:53 PM   #1
LQ Newbie
Registered: May 2009
Posts: 2

Rep: Reputation: 0
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?


Old 05-04-2009, 03:20 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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.

Old 05-05-2009, 08:09 AM   #3
LQ Newbie
Registered: May 2009
Posts: 2

Original Poster
Rep: Reputation: 0

Thanks very much for the tip -- looks like a little 'gotcha' from RHEL got me.

Tip o'my hat to ya,



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
removal of caching nameserver does not stop domain resolution jhwilliams Linux - Software 1 08-10-2007 09:16 PM
nameserver linux_2007_ Linux - Networking 4 03-18-2007 10:56 PM
which is my nameserver. bruse Linux - Networking 3 07-16-2005 01:45 AM
nameserver question r.stiltskin Linux - Networking 4 08-11-2004 03:46 AM
NameServer Probs .... Ma2LeY Linux - Networking 2 01-28-2004 03:48 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:46 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration