1834484 Members
3804 Online
110067 Solutions
New Discussion

nslookup & hosts

 
SOLVED
Go to solution
Jie Li
Frequent Advisor

nslookup & hosts

It looks like after I added dns, the nslookup isn't working, and somehow it wouldn't look up in the hosts file.

lpstat -o
lpstat: HPDPS error (Cannot determine the local IP address.)

nslookup xxx.xx.xx.xxx
*** Unknown source : hosts. Not Supported
*** You have defind one or more supported sources.
*** Please modify your configuration file and try again
*** or you will get unreliable information.
No name server/service(s) responding.


Thanks
10 REPLIES 10
Sanjay_6
Honored Contributor

Re: nslookup & hosts

hi,

can you attach your /etc/nsswitch.conf file.

Thanks
Sanjay
Jie Li
Frequent Advisor

Re: nslookup & hosts

I only have one line in that file:

hosts: dns hosts
Muthukumar_5
Honored Contributor

Re: nslookup & hosts

Your problem is on /etc/nsswitch.conf there.

hosts: entry there.

hosts: dns files ldap ...

I hope you have defined two hosts: information there?? check there.

cat /etc/nswitch.conf --> to forummers

HTH.
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: nslookup & hosts

what is there in /etc/resolv.conf and /etc/hosts files there.

It will give dns / files hosts informations there. Post those entries too.
Easy to suggest when don't know about the problem!
Jeff_Traigle
Honored Contributor

Re: nslookup & hosts

That's what I suspected frm the error you got. The nsswitch.conf file should look like this:

hosts: dns [SUCCESS=return NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] files

(The directives between the [] just guarantees that all programs, regardless if they were linked with libc.1 or libc.2, resolve the same way.)
--
Jeff Traigle
Prashant Zanwar_4
Respected Contributor

Re: nslookup & hosts

One possibility is if you are versioining with DNS files, you have lock out the file properly increamenting the serial number of for changed entries in respective file. Have you dont it properly.
co
ci
co...It is something like that..Am I correct.

Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Prashant Zanwar_4
Respected Contributor

Re: nslookup & hosts

Sorry, also you have restart your named using the script. And update the caching server for having latest updates. Also push the entries on zoning servers too..

Thanks
hope it helps
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Sanjay_6
Honored Contributor
Solution

Re: nslookup & hosts

hi,

check your entry,

it should be

hosts: dns files

hope this helps.

Regds
Jie Li
Frequent Advisor

Re: nslookup & hosts

cat /etc/nsswitch.conf
hosts: dns hosts


# cat /etc/resolv.conf
domain somewhere.edu
nameserver xxx.xx.x.xxx
nameserver xxx.xx.x.xxx
nameserver xxx.xx.x.xxx

# cat /etc/hosts
......
xxx.xx.xxx.xx name_of_the_printer
.......
Jie Li
Frequent Advisor

Re: nslookup & hosts

Sanjay:

Thanks. It solved my problem.