Operating System - Linux
1755764 Members
2742 Online
108838 Solutions
New Discussion юеВ

Problem With Hostname Resolving

 
Karthik S S
Honored Contributor

Problem With Hostname Resolving

Hi,

I have posted this also at,

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

Hi,

We have a linux machine with proper network configuration. nslookup is working ok when you try to resolve other hostnames. But ping fails unless otherwise you give a FQDN.

i.e

ping node1 - fails
ping node1.domain.com - passes

What could be the reason. Problem is not only with the ping but due to this automounting of shares also fails. Extract from messages file,

-----------------------------------------------
[root@linux-pc /etc]# more /var/log/messages
Jul 20 04:25:17 linux-pc syslogd 1.4-0: restart.
Jul 20 04:24:55 linux-pc nis_cachemgr[571]: Could not lookup cbin.eng.: NIS+ servers unreachable
Jul 20 04:25:54 linux-pc last message repeated 6 times
Jul 20 04:25:55 linux-pc automount[691]: attempting to mount entry /auto/ecs
Jul 20 04:26:04 linux-pc nis_cachemgr[571]: Could not lookup cbin.eng.: NIS+ servers unreachable
Jul 20 04:26:05 linux-pc automount[9274]: mount(nfs): entry ecs: host coffee: lookup failure
Jul 20 04:26:14 linux-pc nis_cachemgr[571]: Could not lookup cbin.eng.: NIS+ servers unreachable

-----------------------------------------------


Though it says NIS server is not reachable I am able to resolve other tables like passwd, group. DNS is used for hosts. /etc/resolv.conf and /etc/nsswitch.conf are just fine.

Pl. help

Thanks
Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
9 REPLIES 9
Pete Randall
Outstanding Contributor

Re: Problem With Hostname Resolving

Karthik,

What do your /etc/resolv.conf and /etc/nsswitch.conf files look like?


Pete


Pete
Karthik S S
Honored Contributor

Re: Problem With Hostname Resolving

Pete,
/etc/resolv.conf
search domain.com
nameserver x.x.x.x
domain domain.com

The point here is Nslookup just works fine even without FQDN

/etc/nsswitch.conf

hosts: files dns

all other services are configured for "files nisplus"

Thanks,
Karthik

For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Karthik S S
Honored Contributor

Re: Problem With Hostname Resolving

Pete,

It may sound funny ... but it is working now after a reboot :-))
(It was not a so critical system ... so I could afford rebooting it)
-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Karthik S S
Honored Contributor

Re: Problem With Hostname Resolving

But I have another question 4 u .. :-)

I was wondering if there is any command to find out the replication status between a Master NIS+ and a Replicated NIS+ Server.

Thanks
Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Pete Randall
Outstanding Contributor

Re: Problem With Hostname Resolving

Karthik,

Sorry, I don't do NIS. We tried it years ago and found it to be more trouble than it was worth.

I hope things continue to work now that you've re-booted.


Pete


Pete
Steven E. Protter
Exalted Contributor

Re: Problem With Hostname Resolving

Check the man pages on the yp commands.

Most of the important stuff is there on HP-UX. I'll check a book and get back to you with specifics when I get to the office.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Karthik S S
Honored Contributor

Re: Problem With Hostname Resolving

Hi Stevan,

"nisping -u" does something similar but only shows the last update time.

Thanks,
Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Balaji N
Honored Contributor

Re: Problem With Hostname Resolving

hey
by any chance was the domainname altered by command name.

and hence ping was not working.

once u rebooted, the domain name was set properly and worked?

just a thought.
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Karthik S S
Honored Contributor

Re: Problem With Hostname Resolving

No domain name is set properly. Also "search domain.name" is defined in /etc/resolv.conf.

Regards,
Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn