1827283 Members
3573 Online
109717 Solutions
New Discussion

nslookup localhost

 
Victor Geere
Frequent Advisor

nslookup localhost

nslookup localhost returns
Server can't find localhost. servfail.

localhost is definid in hosts and nsswitch.conf contains the line

hosts: file db nisplus nis dns

I can ping localhost and it resolves to 127.0.0.1, but I can't connect to the HP-Eloquence server on the local machine. The similar problem on HP-UX was solved by changing nsswitch.conf so that nslookup localhost resolves.

I am using RedHat 7.1.

I thought that I was because I had thought.
4 REPLIES 4
Tom Maloy
Respected Contributor

Re: nslookup localhost

I believe that the first entry should be "files", not "file". Check the man page on nsswitch.conf.

Tom
Carpe diem!
Victor Geere
Frequent Advisor

Re: nslookup localhost

fat finger syndrome here.

It says
hosts: files db nisplys nis dns

in the nsswitch.conf.
I thought that I was because I had thought.
Shahul
Esteemed Contributor

Re: nslookup localhost

Hi

nsswitch.conf is OK. What abot ur /etc/hosts file. It should have a line for local IP addaress and other for loop back address. please check it out...

Best of luck
Shahul
Craig Kelley
Valued Contributor

Re: nslookup localhost

The nslookup program only does DNS queries. It doesn't pay attention to host files, NIS or any other naming system. So, when you query for 'localhost', it rightly tells you that there is no such host from the DNS server that it's querying.