Operating System - HP-UX
1832188 Members
2875 Online
110038 Solutions
New Discussion

Re: Swinstall / swlist Could not contact host

 
Victor Burguillos_4
Frequent Advisor

Swinstall / swlist Could not contact host

Hi,
I have a problem, when I try install any things or list product or patch with swlist commnad the system show me the following error:
srvux01:/> swlist
# Initializing...
# Contacting target "srvux01"...
ERROR: Could not contact host "srvux01". 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 srvux01:/var/adm/sw/swagentd.log).

Tnks,

VB
10 REPLIES 10
Torsten.
Acclaimed Contributor

Re: Swinstall / swlist Could not contact host

Follow the advise:

- Make sure the hostname is correct
# hostname
-> my_host

# nslookup my_host

- More information may be found in the daemon logfile

# more /var/adm/sw/swagentd.log

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!   
OldSchool
Honored Contributor

Re: Swinstall / swlist Could not contact host

try restarting the swagentd

/usr/sbin/swagentd -r


then try your list again
Victor Burguillos_4
Frequent Advisor

Re: Swinstall / swlist Could not contact host

I was reset the swagentd but don't work:

srvux01:/> /usr/sbin/swagentd -r
srvux01:/> swlist
# Initializing...
# Contacting target "srvux01"...
ERROR: Could not contact host "srvux01". 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 srvux01:/var/adm/sw/swagentd.log).
srvux01:/> nslookup srvux01
Name Server: pm01vm01.fyccorp.com
Address: 192.168.170.61

Trying DNS
Trying NIS
looking up FILES
Name: srvux01
Address: 192.168.170.42

Regards,

VB
OldSchool
Honored Contributor

Re: Swinstall / swlist Could not contact host

as noted previously:
- More information may be found in the daemon logfile

# more /var/adm/sw/swagentd.log

Victor Burguillos_4
Frequent Advisor

Re: Swinstall / swlist Could not contact host

atach the swagendt.log
Bill Hassell
Honored Contributor

Re: Swinstall / swlist Could not contact host

You will want to change your nsswitch.conf file. Always have files first in the nsswitch.conf file. Are you using DNS and also NIS? If not, do not list them in the conf file. Without DNS and NIS, you can fix your file with:

cp /etc/nsswitch.conf /etc/nsswitch.conf.old
cp /etc/nsswitch.files /etc/nsswitch.conf

Then restart swagentd with:

swagentd -r

No, you don't have to kill the current swagentd -- the -r will restart swagentd automatically.

The problem was likely caused by a recent IP address or hostname change.


Bill Hassell, sysadmin
whiteknight
Honored Contributor

Re: Swinstall / swlist Could not contact host


Victor,

#vi /etc/nsswitch.conf
hosts: files dns

#swagentd -r

WK
Problem never ends, you must know how to fix it
Jollyjet
Valued Contributor

Re: Swinstall / swlist Could not contact host

change the name service switch to etc/host from sam.
Victor Burguillos_4
Frequent Advisor

Re: Swinstall / swlist Could not contact host

Thanks everybody.

It's work.

Regards,

VB
Victor Burguillos_4
Frequent Advisor

Re: Swinstall / swlist Could not contact host

Thans everybody for your help