1833137 Members
3609 Online
110051 Solutions
New Discussion

Name Resolution

 
Jim Booker
Advisor

Name Resolution

Static ip on RedHat 7.2 --
nslookup will not resolve a hostname that is NOT in dns. I tried moving my resolv.conf to a different name. My nsswitch.conf looks like this:
hosts: files nisplus dns

This is causing loading my omniback client to fail. Thanks!!!
19 REPLIES 19
George_Dodds
Honored Contributor

Re: Name Resolution

Have you tried stop/start named ?
Jim Booker
Advisor

Re: Name Resolution

named is not running. This is just a
workstation that I am trying to load OmniBack on, but thanks.
Helen French
Honored Contributor

Re: Name Resolution

Hi,

You have posted the same 3 times ! See this:

http://forums.itrc.hp.com/cm/FamilyHome/1,,117,00.html


Shiju

Life is a promise, fulfill it!
Jim Booker
Advisor

Re: Name Resolution

I'm sorry about posting this 3 times.
I thought I needed to repost because
I had not posted it to the correct category.
Sanjay_6
Honored Contributor

Re: Name Resolution

Hi Jim,

If you are using DNS also, let your /etc/nsswitch.conf look like this,

hosts : DNS [NOTFOUND=CONTINUE] files

or

hosts : files [NOTFOUND=CONTINUE, TRYAGAIN=CONTINUE] DNS

Hope this helps.

Regds
Jim Booker
Advisor

Re: Name Resolution

I would expect that if dns fails to resolve the name, the /etc/hosts file would be looked at if "files" is in the nsswitch.conf file, but that doesn't seem to be happening. I tried the "NOTFOUND", but that didn't work either. It seems the /etc/hosts file is never beeing looked at.
Uday_S_Ankolekar
Honored Contributor

Re: Name Resolution

HI,
nsswitch file should look like this
hosts: dns [NOTFOUND=continue UNAVAIL=continue] file [NOTFOUND=return UNAVAIL=continue

-USA..
Good Luck..
Helen French
Honored Contributor

Re: Name Resolution

Hi,

Can you invoke the command with 'swdebug' option ? This may help you in tracing out the problem.

Shiju
Life is a promise, fulfill it!
Sanjay_6
Honored Contributor

Re: Name Resolution

Hi Jim,

this is what my /etc/nsswitch.conf looks like,

hosts : DNS {NOTFOUND=CONTINUE] files

my /etc/resolv.conf looks like

search my.local.domain
nameserver my.nameserver.ip_1
nameserver my.nameserver.ip_2
nameserver my.nameserver.ip_3

I have added a new ip to my /etc/hosts file and then did a nslookup. I got the info from the files (/etc/hosts)

nslookup
> server_name_in_/etc/hosts
>exit

I got the ip address of this system which is not specified in the DNS but is specified in the /etc/hosts file.

Hope this helps.

Regds


Jim Booker
Advisor

Re: Name Resolution

I tried the different "NOTFOUND" entries, but they did not help.

I'm not familiar with swdebug. It doesn't seem to be on the linux box.

/etc/hosts still seems to not ever get looked at. Thanks.
Jim Booker
Advisor

Re: Name Resolution

Thanks again - I've tried all of the suggestions so far, but none have worked. It still seems that for some unknown reason, the /etc/hosts file is not being looked at.
Sanjay_6
Honored Contributor

Re: Name Resolution

Hi Jim,

check the permission on your /etc/hosts file. you should have read permission for the file.

Also check the nslookup policy,

nslookup
> policy
> exit

Can you post your policy.

Hope this helps.

Regds
Joseph C. Denman
Honored Contributor

Re: Name Resolution

Jim,

I have the same problem with solaris. HPUX nslookup works fine. I think it has something to do with nslookup. nslookup on solaris will not look in the hosts file???? However, if i attempt to ...let say ping a host...it resolves fine.

If anyone else has the official answer, I would also like to hear it.

...jcd...
If I had only read the instructions first??
Uday_S_Ankolekar
Honored Contributor

Re: Name Resolution

Try this..

hosts: dns [!UNAVAIL=return] files

-USA..
Good Luck..
Helen French
Honored Contributor

Re: Name Resolution

Hi,

Does any options specified in the $HOME/.nslookuprc ? Is this happening to only a single host ? Does it pickup if you give ip_address instaed of hostname ? R u using an FQDN ?

some thoughts ...

Shiju

Life is a promise, fulfill it!
Joseph C. Denman
Honored Contributor

Re: Name Resolution

Shoot, I have went to the extreme and taken the dns out of the nsswitch.conf file. It still checks dns.

nsswitch.conf entry:

hosts: files


????????

...jcd...
If I had only read the instructions first??
Joseph C. Denman
Honored Contributor

Re: Name Resolution

Don't have a .nslookup....

nslookup will not resolve at all. However all other utilities resolve fine...telnet,ping,traceroute...

Not using FQDN


Like I said, I think it is something with nslookup.

...jcd...
If I had only read the instructions first??
Joseph C. Denman
Honored Contributor

Re: Name Resolution

I posted this same question on the sun forum a couple of weeks ago, but as usual on that forum....no response.

!!!A BIG KUDOS TO ITRC FORUM!!!

YOU MAY NOT GET THE ANSWER YOU WANT, BUT YOU WILL GET A ANSWER!!!!
If I had only read the instructions first??
Sanjay_6
Honored Contributor

Re: Name Resolution

Hi Joseph,

Try this sun solaris manual to resolve your hostname lookup problem,

http://docs.sun.com/ab2/coll.47.8/NISQSTART/@Ab2TocView?Ab2Lang=C&Ab2Enc=iso-8859-1

Hope this helps.

Regds