Operating System - HP-UX
1833757 Members
2885 Online
110063 Solutions
New Discussion

error reported by nslookup

 
Jdamian
Respected Contributor

error reported by nslookup

Hi

My /etc/resolv.conf file is properly configured in order to use a DNS server. But nslookup command fails. For instance:

$ nslookup www.myweb.com

*** Can't find server name for address 172.27.200.141: Non-existent domain
*** Can't find server name for address 172.27.200.142: Non-existent domain
*** Default servers are not available
Using /etc/hosts on: mysystem

looking up FILES
Trying DNS
*** can't find www.myweb.com: No response from server

Then I use nslookup without arguments and the same error message is reported:

*** Can't find server name for address 172.27.200.141: Non-existent domain
*** Can't find server name for address 172.27.200.142: Non-existent domain
*** Default servers are not available
Using /etc/hosts on: mysystem

>


Then I type:

> server 172.27.200.141
Specifying a server has overridden the switch policy order.
The reset command will reinstate the order specified by the switch policy.
Default Name Server: [172.27.200.141]
Address: 172.27.200.141

Now I type "www.myweb.com" (or another URL) and it is solved properly; no error is reported.

Name Server: [172.27.200.141]
Address: 172.27.200.141

Trying DNS
Non-authoritative answer:
Name: www.myweb.es
Address: 198.135.197.220

You can find the following lines in the manual pages of nslookup command:

"To override the switch policy and query DNS
servers directly, the server command can be used to specify a
nameserver. This same overriding of the switch policy can also be done
by providing a nameserver as the second argument on the command line."

But this doesn' work. I typed on the command line

$ nslookup www.terra.es 172.27.200.141
Specified server is not available.
The configured name services and switch policy will be used.
*** Can't find server name for address 172.27.200.141: Non-existent domain
*** Can't find server name for address 172.27.200.142: Non-existent domain
*** Default servers are not available
Using /etc/hosts on: mysystem

looking up FILES
Trying DNS
*** can't find www.myweb.com: No response from server

Can anyone help me ?

Thanx in advance
9 REPLIES 9
Scott Van Kalken
Esteemed Contributor

Re: error reported by nslookup

have you got an /etc/nsswitch.conf file?

Mine is very simple and is NON NIS.

hosts : files [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] dns
aliases : files
services : files
protocols : files
networks : files

This may fix the problem.

Is you DNS server in your /etc/resolv.conf?

search mydodgydomain.com
#use our local dns
nameserver 10.198.11.154

if specifying by name, is it in the hosts files and are these files world readble?

They gotta be world readble for people other than root to use em.

Scott.
Jdamian
Respected Contributor

Re: error reported by nslookup

Yes.

/etc/resolv.conf and /etc/nsswitch.conf are properly set.

Moreover, both files have been modified in order to test other configurations.
John Bolene
Honored Contributor

Re: error reported by nslookup

UNIX error messages can be so deceiving.

172.27.200.141 is not in your reverse lookups

you are unable do a IP to name resolution
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Sanjay_6
Honored Contributor

Re: error reported by nslookup

Hi Damian,

Put the nameserver name and ip address in your /etc/hosts file. Can you post your nsswitch.conf and resolv.conf files for us to look at.

Regds
Christopher Caldwell
Honored Contributor

Re: error reported by nslookup

172.27 is a reserved address - that means it won't appear (nor is it routable) on the global Internet.

Check basic IP connectivity to that nameserver:
$ping 172.27.200.141
and/or
$ping 172.27.200.142

If your box is outside of a firewall, you probably don't have direct connectivity to those nameservers (they're behind the firewall).

If your box is inside a firewall, look at your default gateway and routes, something is missing somewhere.

rick jones
Honored Contributor

Re: error reported by nslookup

what john pointed-out is probably germane (if perhaps a bit cryptic :)

nslookup is rather insitant on being able to reverse-map the DNS server's IP address to a server name. it gets rather cranky when this does not work.

to make it work, you need PTR records in the DNS servers mapping from IP addresses to hostnames. nslookup is also not terribly good about completely honouring the /etc/nsswitch.conf file...

"normal" name resolution through gethostbyname() et all will likely still work fine though. as will (iirc) utilities such as dig - which may (again iirc) be distributed along with the web-releases of BIND from www.software.hp.com
there is no rest for the wicked yet the virtuous have no pillows
Jdamian
Respected Contributor

Re: error reported by nslookup

My nsswitch.conf file is:

#
# /etc/nsswitch.files:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any name services.
#
passwd: files
group: files
hosts: files dns
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files


My /etc/resolv.conf file is:

;
; /etc/resolv.conf file for using
; a server on another host.
;
domain myweb.com
nameserver 172.27.200.141
nameserver 172.27.200.142


The core of my question is:

why does nslookup run fine if it is executed on interactive mode and "server 172.27.200.141" is type ?

Why doesn't nslookup run as described in the previous line when I provide the IP addres of resolver server as argument in the command line ?

Have you noticed that nslookup solves fine when the switch policy order has been overridden ?
Ruediger Noack
Valued Contributor

Re: error reported by nslookup

Looks like your nameservers are not able to resolve their own DNS name. Check your config on the nameservers.

Ruediger
Jdamian
Respected Contributor

Re: error reported by nslookup

.