1834931 Members
2578 Online
110071 Solutions
New Discussion

incorrect hostname

 
maria paschali
Frequent Advisor

incorrect hostname

hi,

i appear to be having a weird problem, that im not sure how to resolve. Im running hpux 11.0.

when i do a uname -a i get the correct information however, when i run hostname, it comes back with a "-a"

#uname -a
HP-UX name B.11.00 U 9000/800 573740508 unlimited-user license

#hostname
-a

anyone seen this before?
i have the "hostname" in the /etc/hosts file. I have also checked my /etc/resolv.conf and all appears ok.

when i do an nslookup of that hostname it reports the following

Using /etc/hosts on: -a

looking up FILES
Name: name
address: x.xx.xx.xx

This has caused problems on this machine for applications that rely on the "hostname" and not on ip.

The swagentd.log is returning the following message
ARNING: An attempt to get the network host entry for "-a" 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.

This was working before lunch and im not sure what has ahppened.

Any fixes?

thanks in advance
maria
5 REPLIES 5
maria paschali
Frequent Advisor

Re: incorrect hostname

i have resolved this issue by running set_parms hostname.
but im still not sure what occured.

when i ran the set_parms hostname it said that my hostname was "name" which was correct.

any ideaS?

regards
maria
U.SivaKumar_2
Honored Contributor

Re: incorrect hostname

Hi,
Check this file
/etc/rc.config.d/netconf

What is the hostname set there
HOSTNAME= ???
Set the right hostname and do this.
#/sbin/init.d/net start

see now

regards,
U.SivaKumar
Innovations are made when conventions are broken
maria paschali
Frequent Advisor

Re: incorrect hostname

hi thanks for your response,

i checked it at it was set to the actual hostname.

which is again weird.
im very confused as to what is happening. :D
Rainer von Bongartz
Honored Contributor

Re: incorrect hostname


Maria,

you at one time used the wron command.

You sure wanted to to

uname -a

to see the info for your host.
If you accidently issued the command

hostname -a

then the system sets your hostname to '-a'

Regards
rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
maria paschali
Frequent Advisor

Re: incorrect hostname

hi,

that could be possible, but the only time i used that command (hostname) was after the swagentd.log told me there was a problem. ie it thought the hostname was -a.

Thanks for your input though.
i doubt there is another explanation.

thanks again