1837202 Members
2251 Online
110115 Solutions
New Discussion

HOST NAME PROBLEM

 
SOLVED
Go to solution
Kwahae_1
Regular Advisor

HOST NAME PROBLEM

Hi, Just installed an HP-UX 11.23 on an rp5470. I tried to do a swlist on the server but came up with the following:

I have included my hosts and lan card info. What could be wrong?

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

# cat /etc/hosts


## Configured using SAM by root on Wed Jun 11 23:23:56 2008
## Configured using SAM by root on Mon Jun 16 11:41:29 2008
# @(#)B11.23_LRhosts $Revision: 1.9.214.1 $ $Date: 96/10/08 13:20:01 $
#
127.0.0.1 localhost
192.168.242.107 dmartsrv
192.168.140.99 dns1 dns1.afdb.org

# ifconfig lan1

lan1: flags=843
inet 192.168.242.107 netmask ffffff00 broadcast 192.168.242.255

# netstat -rn

Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
192.168.242.107 192.168.242.107 UH 0 lan1 4136
192.168.242.0 192.168.242.107 U 2 lan1 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
default 192.168.242.1 UG 0 lan1 0

# hostname
dmartsrv

# uname -a
HP-UX dmartsrv B.11.23 U 9000/800 1137424601 unlimited-user license
#

2 REPLIES 2
Anka
Trusted Contributor
Solution

Re: HOST NAME PROBLEM

check first the /etc/nsswitch.conf file, if such one does not exist you can copy one of the defaults:

ll /etc/nsswitch.*

#mv /etc/nsswitch.files /etc/nsswitch.conf
and edit the both lines to look as follows:

hosts: files [NOTFOUND=continue] dns
ipnodes: files [NOTFOUND=continue] dns

I assume that you do not use NIS!

Try also with editing the /etc/hosts file as follows:

192.168.242.107
Kwahae_1
Regular Advisor

Re: HOST NAME PROBLEM

Thanks Anka, it worked.