Operating System - HP-UX
1847718 Members
5319 Online
110265 Solutions
New Discussion

Re: Patching problem - can not even run swlist

 
Jim Green_1
Occasional Advisor

Patching problem - can not even run swlist

We just got a new rp2470 box running 11i.
I want to see what patches are on it so I can determine what patches to install.
From root when I run:
# swlist

I get the following
# swlist
# Initializing...
# Contacting target "viking1"...
ERROR: Could not contact host "viking1". 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 viking1:/var/adm/sw/swagentd.log).

What's wrong?
Thanks,
jg

10 REPLIES 10
steven Burgess_2
Honored Contributor

Re: Patching problem - can not even run swlist

Hi

Have you got viking1 in /etc/hosts file ?

what happens if you attempt to nslookup or ping viking1

If all ok with name resolution try

swagentd -r

HTH

Steve
take your time and think things through
Ashwani Kashyap
Honored Contributor

Re: Patching problem - can not even run swlist

Is your hostname set up properly int /etc/hosts file and /etc/rc.config.d/netconf file .
John Bolene
Honored Contributor

Re: Patching problem - can not even run swlist

Did you change the name or IP of the box after it was booted?

swagentd caches and may have the wrong name

do a swagentd -r to restart

It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Jim Green_1
Occasional Advisor

Re: Patching problem - can not even run swlist

To answer your questions:

1. nslookup shows the following:
$ nslookup viking1
Name Server: ns3.mrms.navy.mil
Address: 192.156.84.99

Trying DNS
Trying NIS
looking up FILES
Name: viking1/prc/mrms.navy.mil
Address: 192.156.84.71
Aliases: viking1

This looks fine.

2. ping shows the following:
$ /etc/ping viking1
PING viking1/prc/mrms.navy.mil: 64 byte packets
64 bytes from 192.156.84.71: icmp_seq=0. time=0. ms
64 bytes from 192.156.84.71: icmp_seq=1. time=0. ms
64 bytes from 192.156.84.71: icmp_seq=2. time=0. ms
64 bytes from 192.156.84.71: icmp_seq=3. time=0. ms

----viking1/prc/mrms.navy.mil PING Statistics----
4 packets transmitted, 4 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/0

This looks fine.

3. swagentd -r was no help.

4. /etc/hosts looks like:
# pg /etc/hosts
# @(#)B.11.11_LRhosts $Revision: 1.9.214.1 $ $Date: 96/10/08 13:20:01 $
#
# The form for each entry is:
#
#
# For example:
# 192.1.2.34 hpfcrm loghost
#
# See the hosts(4) manual page for more information.
# Note: The entries cannot be preceded by a space.
# The format described in this file is the correct format.
# The original Berkeley manual page contains an error in
# the format description.
#

192.156.84.99 ns3.mrms.navy.mil ns3
192.156.84.71 viking1
127.0.0.1 localhost loopback

This looks fine.

5. The only things of value in
/etc/rc.config.d/netconf are:

HOSTNAME="viking1"
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=192.156.84.71
SUBNET_MASK[0]=255.255.255.192
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0

ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=192.156.84.65
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""

6. The tail end of file /var/adm/sw/swagentd.log shows:

WARNING: An attempt to get the network host entry for "viking1" 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.
* Checking job queue at 1 minute intervals.

Lastly we helped put up a new HP box at SUBLANT
during the summer and had this same problem. Do not know how it was resolved.

Thanks for your help,
jg
Bill McNAMARA_1
Honored Contributor

Re: Patching problem - can not even run swlist

ensure the /etc/hosts contains the line:

192.156.84.71 viking1

in the line before

127.0.0.1 localhost

correct/delete the incorrect viking1 entry in /etc/hosts

It works for me (tm)
Sanjay_6
Honored Contributor

Re: Patching problem - can not even run swlist

Jim,

Try this link,

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062910478

This is hp doc id KBRC00009981.

Hope this helps.

Regds
John Palmer
Honored Contributor

Re: Patching problem - can not even run swlist

Hi Jim,

I'm intrigued as to why nslookup and ping resolve viking1 as 'viking1/prc/mrms.navy.mil'.

What's in your /etc/resolv.conf ?

Regards,
John
Bill McNAMARA_1
Honored Contributor

Re: Patching problem - can not even run swlist

It seems to be getting viking1/prc/mrms.navy.mil from /etc/hosts

viking1 is an alias soi in /etc/hosts he has

192.156.84.71 viking1/prc/mrms.navy.mil viking1

when he should have

192.156.84.71 viking1 viking1.prc.mrms.navy.mil
or something linke that..*

--
looking up FILES
Name: viking1/prc/mrms.navy.mil
Address: 192.156.84.71
Aliases: viking1
--
It works for me (tm)
Jim Green_1
Occasional Advisor

Re: Patching problem - can not even run swlist

Problem solved! Changed /etc/resolv.conf
from:

domain viking1.prc.mrms.navy.mil
nameserver 192.156.84.99

to:

domain prc.mrms.navy.mil
nameserver 192.156.84.99

swlist now works. Thanks for all your help.
Martin Johnson
Honored Contributor

Re: Patching problem - can not even run swlist

Thanks for posting the solution.

Marty