Operating System - HP-UX
1847870 Members
2999 Online
104021 Solutions
New Discussion

Re: name resolution issue

 
kholikt
Super Advisor

name resolution issue

I have a very funny problem. I have one hpux host, that it cannot resolve it's own name

# hostname
tadb
# nslookup
Using /etc/hosts on: tadb

> tadb
Using /etc/hosts on: tadb

looking up FILES
Name: tadb.com
Address: 172.16.15.80
Aliases: tadb

> tadb.com
Using /etc/hosts on: tadb

looking up FILES
Trying DNS
*** dns01.com can't find tadb.esc: Non-existent domain
>

But my nsswitch.conf and seems to be fine.
# cat /etc/nsswitch.conf
hosts: files [NOTFOUND=continue UNAVAIL=return] dns [NOTFOUND=return UNAVAIL=return TRYAGAIN=return]

171.16.15.84 tadb.esc tadb
abc
8 REPLIES 8
Scott Van Kalken
Esteemed Contributor

Re: name resolution issue

try setting the UNAVAIL to continue in nsswitch.conf as well.

This will let you know if it finds it but thinks it's unavailable.
MANOJ SRIVASTAVA
Honored Contributor

Re: name resolution issue

Hi Kholikt


The issue can be

1. Improper resolv.conf , ie does it point to the coreect nameserver .

2. DNS entry itself in the naeserver being pointed by resolv.conf.

Try this , jsut rename the resolv.conf to abc.conf
and try to do a nslookup , if the server checks for /etc/hosts and resolvs it corectly then please do aping to the neamserver and then try checking hte enteries there in.


Manoj Srivastava
T G Manikandan
Honored Contributor

Re: name resolution issue

First you can resolve the host by /etc/hosts file then you can go ahead with dns.

move your /etc/resolv.conf file.
take a copy of your /etc/nsswitch file
#mv /etc/resolv.conf /etc/resolv.conf.old
#cp /etc/nsswitch.conf /etc/nsswitch.conf.currentdate
#cp /etc/nsswitch.files /etc/nsswitch.conf

check whether you have entries for the localhost in your /etc/hosts file

check whether it is resolving now.If it resolves make the old changes and try making it resolve using dns.

Thanks
G Manikandan
Kurt Beyers.
Honored Contributor

Re: name resolution issue

Hi Kholikt,

I guess Omniback is involved in this story as well. See the following thread as well:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xc072107d277ad611abdb0090277a778c,00.html

Kurt
John Dvorchak
Honored Contributor

Re: name resolution issue

From what you sent us, I really can't tell the problem. It would be helpful if you included the /etc/resolv.conf file and grep tadb from /etc/hosts i.e.

>grep tadb /etc/hosts

But it looks like the system doesn't know it's FQDN (Fully Qualified Domain Name) like
tadb.your.com.

There are a couple of ways for the computer to find it's own name. I suggest putting the first entry in /etc/hosts as:
172.16.15.80 tadb.your.com tadb

and having your domain set in the resolv.conf file:

domain your.com
server 123.234.123.234 #your Nameserver address

Your /etc/nsswitch.conf file says to try /etc/hosts first then DNS second.

If it has wheels or a skirt, you can't afford it.
Jack Werner
Frequent Advisor

Re: name resolution issue

See what the tadb entry in /etc/hosts looks like:
[171.16.15.84 tadb.com tadb]?

This could be different from the hostname in /etc/nsswitch.

What is the proper fully qualified DNS name of the tadb host: tadb.esc or tadb.com ?
i'm retired
Jack Werner
Frequent Advisor

Re: name resolution issue

Sorry,
I specified the wrong IP address for tadb in my prior post. I looks to me like the tadb alias is assigned to 2 different IP addresses/hosts.
i'm retired
Brian Hackley
Honored Contributor

Re: name resolution issue

Hi,

Here's a TIP that might help you:

On HP-UX 11.0 and up, use nsquery instead of nslookup to look up hosts, passwd, and group entries. nsquery uses the actual gethostbyXXX getpwdXXX and getgrXXX interfaces, wheres nslookup does not.

For example:
nsquery hosts jbox
nsquery passwd hackley

# nsquery hosts jbox

Using "files [NOTFOUND=continue] dns" for the hosts policy.

Searching /etc/hosts for jbox
Hostname: jbox
Aliases:
Address: 10.10.10.204
Switch configuration: Terminates Search

# nsquery passwd hackley

Using "files" for the passwd policy.

Searching /etc/passwd for hackley
User name: hackley
User Id: 101
Group Id: 20
Gecos:
Home Directory: /home/hackley
Shell: /sbin/sh

Switch configuration: Terminates Search

Hope you find this helpful,

-> Brian Hackley
Ask me about telecommuting!