Operating System - HP-UX
1837521 Members
3746 Online
110117 Solutions
New Discussion

Re: swinstal versus hostname

 
Jan Sladky
Trusted Contributor

swinstal versus hostname

Hi all,
my machine is not in DNS and meanwhile can't be..

if I have nameservers in /etc/hostname I can't carry out swinstall because of following error:

Could not contact host "dakar". Make sure the hostname is correct and absolut pathname is specified (begining with "/")

does exists some solution how to have nameservers, correct swinstall and not to be in DNS?

thanks Jan
GSM, Intelligent Networks, UNIX
15 REPLIES 15
Joseph Loo
Honored Contributor

Re: swinstal versus hostname

hi,

did you place your server in the /etc/hosts?



# /sbin/init.d/swagentd stop
# /sbin/init.d/swagentd start

then try swinstall -s , e.g. swinstall -s /tmp/ABCD.depot

regards.
what you do not see does not mean you should not believe
Robert-Jan Goossens
Honored Contributor

Re: swinstal versus hostname

Hi Jan,

145.x.x.48 server_name loghost
127.0.0.1 localhost loopback

Be shore to set the correct name in the /etc/hosts file with the loopback to 127.0.0.1.

# swinagentd -k

# swinagentd -r

Hope this helps,
Robert-Jan
Jan Sladky
Trusted Contributor

Re: swinstal versus hostname

thanks for advices, but it doesn't help

hostname is dakar, ip 10.32.113.231

/etc/hosts:
127.0.0.1 localhost loopback
10.32.113.231 dakar dakar
10.32.113.121 sundance sun

output form # netstat -r :
Dest/Netmask Gateway
localhost localhost UH
10.32.113.231 10.32.113.231 UH
10.32.113.0 10.32.113.231 U
127.0.0.0 localhost U
default 10.32.113.1 UG

how to solve it ? :-(
thanks Jan
GSM, Intelligent Networks, UNIX
Robert-Jan Goossens
Honored Contributor

Re: swinstal versus hostname

Hi Jan,

Could you check if you get the same output from

# nslookup dakar
# nslookup 10.32.113.231

should be something like

Using /etc/hosts on: dakar

looking up FILES
Name: dakar
Address: 10.32.113.231
Aliases: dakar.

Robert-Jan
Joseph Loo
Honored Contributor

Re: swinstal versus hostname

just to confirm:

# cd /
# /sbin/init.d/swagentd stop
# /sbin/init.d/swagentd start
# swinstall -s
e.g. # swinstall -s /tmp/ABCD.depot

do you still get the same error?

regards.
what you do not see does not mean you should not believe
Jan Sladky
Trusted Contributor

Re: swinstal versus hostname

to Robert-Jan

nslookup did not find anything :

root@dakar:/root# nslookup dakar
*** Warning - the local domain is not set.
*** Either hostname should be a domain name,
*** the domain should be specified in /etc/resolv.conf,
*** or the shell variable LOCALDOMAIN should be set.

Name Server: ntns01.ad.eurotel.cz
Address: 10.32.154.60

Trying DNS
*** ntns01.ad.eurotel.cz can't find dakar: Server failed
root@dakar:/root# nslookup 10.32.113.231
*** Warning - the local domain is not set.
*** Either hostname should be a domain name,
*** the domain should be specified in /etc/resolv.conf,
*** or the shell variable LOCALDOMAIN should be set.

Name Server: ntns01.ad.eurotel.cz
Address: 10.32.154.60

Trying DNS
*** ntns01.ad.eurotel.cz can't find 10.32.113.231: Non-existent domain


but after that I realized that problem can be in Network Service Switch - I allowed next step if DNS item is not found and now it is OK ;-)

but nslookup still doesn't find items in /etc/hosts:
Trying DNS
looking up FILES # ???
Trying NIS
*** No address information is available for "dakar"

Has anybody some idea ?

thanks Jan
GSM, Intelligent Networks, UNIX
Jan Sladky
Trusted Contributor

Re: swinstal versus hostname

to Joseph - confirmed ;-)
GSM, Intelligent Networks, UNIX
Shaikh Imran
Honored Contributor

Re: swinstal versus hostname

Hi,
In this case if p[ossible try after rebooting the server.

Regards
I'll sleep when i am dead.
Shaikh Imran
Honored Contributor

Re: swinstal versus hostname

Hi,
Make sure you have a good backup (just to be on 100 % safer side) before reboot.
My most of the swinstall problems which were not having any meaning got solved after server reboot.

Regards
I'll sleep when i am dead.
Robert-Jan Goossens
Honored Contributor

Re: swinstal versus hostname

Hi Jan,

Before you reboot.

Check the /etc/nsswitch.conf

hosts should be set to files.

Regards,
Robert-Jan
Robert-Jan Goossens
Honored Contributor

Re: swinstal versus hostname

add on,

there should be a few default nsswitch.conf files in the /etc dir.

nsswitch.compat
nsswitch.files
nsswitch.nisplus
nsswitch.conf
nsswitch.hp_defaults
nsswitch.eic
nsswitch.nis

You do not use Nis or DNS so you should copy the nsswitch.files over nsswitch.conf.

Make a backup of the original nsswitch.conf :-)

Regards,
Robert-Jan
Joseph Loo
Honored Contributor

Re: swinstal versus hostname

hi,

careful with how u use the default nsswitch.* files.

# vi /etc/nsswitch.conf
add only this line first
hosts: files dns [NOTFOUND=return] nis [NOTFOUND=return]

and try nslookup command again.

if okay, restart swagentd and test swinstall.

regards.
what you do not see does not mean you should not believe
Jan Sladky
Trusted Contributor

Re: swinstal versus hostname

reboot didn't help,

change in nssswitch.conf yes but now it is a little confusing because original settings is

dns - continue in all cases but nothing is found in /etc/hosts
GSM, Intelligent Networks, UNIX
Robert-Jan Goossens
Honored Contributor

Re: swinstal versus hostname

hosts: files dns [NOTFOUND=return] nis [NOTFOUND=return]

above line from Joseph should be correct, first files then dns then nis

I do not use NIS or DNS mine have only files configured. below is my nsswitch.conf

#
# /etc/nsswitch.files:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any name services.
#
passwd: files
group: files
hosts: files
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files


Regards,
Robert-Jan
Jan Sladky
Trusted Contributor

Re: swinstal versus hostname

thanks all,

I have given /ets/hosts on the first place , now it is ok:

hosts: files [NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]
passwd: files
group: files
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files


br Jan
GSM, Intelligent Networks, UNIX