Operating System - HP-UX
1834022 Members
2279 Online
110063 Solutions
New Discussion

error about swlist and hostname

 
daniel yao_1
Occasional Advisor

error about swlist and hostname

# swlist
# Initializing...
# Contacting target "abcde"...
ERROR: Could not contact host "abcde". Make sure the hostname is correct.
ERROR: More information may be found in the daemon logfile on this target (default location is szdcb:/var/adm/sw/swagentd.log).

#more swagentd.log
WARNING: An attempt to get the network host entry for "szdcb" 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.

but i ping hostname ,it's ok.
9 REPLIES 9
Dirk Wiedemann
Respected Contributor

Re: error about swlist and hostname

Hello,

please try the following:
#nslookup hostname
#nslookup hostname.domainname
#nslookup ip
works it fine?

regards
Dirk
daniel yao_1
Occasional Advisor

Re: error about swlist and hostname

#nslookup is ok
Mateja Bezjak
Respected Contributor

Re: error about swlist and hostname

Hi,

It could be that the default realm entries in security files are wrong. Check default_realm in files in /var/adm/sw/security directory.

It should be
# default_realm=machinename.domain

Regards,
Mateja
daniel yao_1
Occasional Advisor

Re: error about swlist and hostname

now is ok.when i close the DNS service
Kim Kendall
Regular Advisor

Re: error about swlist and hostname

The problem is that the hostname that it is resolving, is not the same hostname that is in the /etc/rc.config.d/netconf

You can change the /etc/nsswitch.conf file to resolve the hostname locally first in case the DNS name is different:

hosts: files [NOTFOUND=continue] dns

Make sure there is only one copy of netconf in the /etc/rc.config.d directory, ie., make sure there aren't any backup copies of the netconf(netconf.bak, netconf.orig, etc).

Make sure the HOSTNAME = xxxxx is the same as the entry in the /etc/hosts file. And make sure you don't have a NODENAME = yyyyy defined (look at the tail of the netconf file).



Ashwani Kashyap
Honored Contributor

Re: error about swlist and hostname

Obviously there is a problem in resolving the hostname to itself .
Check your /etc/hosts , /etc/nsswitch.conf /etc/resolv.conf entries .

Alternatively use your hostname as an alias to your loopback or local host and then try and see what happens .
Anil Sedha
Advisor

Re: error about swlist and hostname

I agree with Kim.

You may put the entry in /etc/nsswitch.conf for DNS resolution.

Also do a nslookup and find out what IP address the hostname is resolving itself to.

Stop & restart the network services as below

/sbin/init.d/nfs.client stop
/sbin/init.d/nis.client stop
/sbin/init.d/nfs.server stop
/sbin/init.d/nis.server stop (if configured as slave server)
/sbin/init.d/nfs.core stop


/sbin/init.d/nfs.core start
/sbin/init.d/nis.server start
/sbin/init.d/nfs.server start
/sbin/init.d/nis.client start
/sbin/init.d/nfs.client start

This process might sound crazy but believe me it works..
Live, love and let live
Ian P. Springer
Occasional Contributor

Re: error about swlist and hostname

I just had the same issue. For the records, the fix for me was adding the:

hosts: files [NOTFOUND=continue] dns

entry to /etc/nsswitch.conf, and then restarting swagentd:

# swagentd -r
Sridhar Gopalan
New Member

Re: error about swlist and hostname

Thanks for the posting.
I had the same problem and I followed Ian P. Springer's solution and it works.
Kim Kendall - please edit the host line in your posting.. the square brackets have the ascii equivalent somehow..
Thanks Again
SG