Operating System - HP-UX
1834506 Members
3447 Online
110068 Solutions
New Discussion

/etc/hosts isn't take effect

 
SOLVED
Go to solution
zhenglq
Occasional Contributor

/etc/hosts isn't take effect

when i install patch bundle on my workstation running HPUX10.20,it tell me :

ERROR: "nms:/": The operation you have attempted is only allowed on target machines which have HP OpenView Software Distributor installed. To perform this operation, first run the HP OpenView Software distributor pushAgent(1m).
* Target connection failed for "nms:/".
ERROR: More information may be found in the daemon logfile on this target (default location is nms:/var/adm/sw/swagentd.log).
* Selection had errors.

I "ping nms.foo.com" ,it reply ok.
But when i delete the domian name foo.com from /etc/resolv.conf, and "ping nms",it reply "ping: unknown host nms" .

Thanks for your help
4 REPLIES 4
Steven Sim Kok Leong
Honored Contributor
Solution

Re: /etc/hosts isn't take effect

Hi,

To perform name resolution using /etc/hosts first before dns, insert this line into /etc/nsswitch.conf:

hosts: files [NOTFOUND=continue] dns

Also for the software distributor, it is good practice to insert in your /etc/hosts file the localhost:

127.0.0.1 nms nms.abc.com localhost

Hope this helps. Regards.

Steven Sim Kok Leong
Steffi Jones_1
Esteemed Contributor

Re: /etc/hosts isn't take effect

Make sure you restart the swagentd after you did changes:

/usr/sbin/swagentd -r

SJ
Sanjay_6
Honored Contributor

Re: /etc/hosts isn't take effect

Hi,

Do a "nslookup" on your system and see if the hostname and the ip are resolved correctly.

nslookup
> server_name
> Server_ip_addres
> exit

If you make any changes and the swinstall still gives problem, restart the swagentd process.

/usr/sbin/swagentd -r

Hope this helps.

Regds
zhenglq
Occasional Contributor

Re: /etc/hosts isn't take effect

I copy file nssw.filedns to /etc/nsswitch.conf,
and run "swagentd -r ",then everything is ok.

Thank you .