Operating System - HP-UX
1828775 Members
2505 Online
109985 Solutions
New Discussion

Error when running swlist

 
SOLVED
Go to solution
Andrew Lubeck
Occasional Contributor

Error when running swlist

I'm getting the following error:

# swlist
# Initializing...
# Contacting target "hp024"...
ERROR: Could not contact host "hp024". Make sure the hostname is correct and an absolute pathname is specified (beginning with "/").

ERROR: More information may be found in the daemon logfile on this target (default location is hp024:/var/adm/sw/swagentd.log).

The entry in the swagentd.log shows the following:

WARNING: An attempt to get the network host entry for "hp024" failed. This may result in denial of access to users and agents at this host. Check the spelling of this name, then your "/etc/hosts" file, or your "/etc/resolv.conf" file and DNS resolver configuration. The nslookup program may be helpful in isolating this problem.

I checked the files and they look OK, but I am not an HP-UX Admin, so I may be missing something. Any ideas?

Thanks,

Andy
7 REPLIES 7
Sanjay_6
Honored Contributor

Re: Error when running swlist

Hi Andy,

Make sure the host entry in the /etc/hosts file is correct and matches the one in /etc/rc.config.d/netconf. If you have made changes to the hostname, you need to either restart swagentd or reboot the server.

Hope this helps.

regds
Torsten.
Acclaimed Contributor

Re: Error when running swlist

Looks like it is releated to name resolution. Check this first.

Did you use the root account?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Robert-Jan Goossens
Honored Contributor
Solution

Re: Error when running swlist

Andrew,

# nslookup hp024
# nslookup ip_address_of_hp024

should have the same output.

check your /etc/hosts file.

192.x.x.xxx hp024
127.0.0.1 localhost loopback

check your /etc/nsswitch.conf file
hosts files dns

if you do not have a nsswitch.conf file, copy the /etc/nsswitch.files to the /etc/nsswitch.conf

check your /etc/resolv.conf for the correct dns server.

restart the swagentd
# swagentd -k
# swagentd -r

Regards,
Robert-Jan
Andrew Lubeck
Occasional Contributor

Re: Error when running swlist

You guys are fast!!!!



nslookup is returning errors:

# nslookup hp024
ypwhich: clnt_create error: RPC: Unknown host
Name Server: ns3.lss.emc.com
Address: 168.159.48.49

Trying DNS
*** ns3.lss.emc.com can't find hp024: Non-existent domain


# nslookup 172.23.184.24
ypwhich: clnt_create error: RPC: Unknown host
Name Server: ns3.lss.emc.com
Address: 168.159.48.49

Trying DNS
Name: l82bd024.lss.emc.com
Address: 172.23.184.24
Torsten.
Acclaimed Contributor

Re: Error when running swlist

"You guys are fast!!!!"

expect the best and you will get it here!

make the nslookup working without errors and your problem will be solved (check the nsswitch.conf)

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Andrew Lubeck
Occasional Contributor

Re: Error when running swlist

"if you do not have a nsswitch.conf file, copy the /etc/nsswitch.files to the /etc/nsswitch.conf"


Robert-Jan:

This worked! I had copied over the hp_default file.

Thanks again all. swlist now works. I'll do my software install on Monday and make sure everything works.

This forum is fantastic!
Torsten.
Acclaimed Contributor

Re: Error when running swlist

Plase allow me to add this:

A good forum makes the key decision (at least for me) - it helps me to decide to buy my computer, my TV, my DVD player, my sat stb, my audio ...

Keep posting - have fun!

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!