1846551 Members
2238 Online
110256 Solutions
New Discussion

Re: hostname failed.

 
j773303
Super Advisor

hostname failed.

In the vpar environment, I met a big problem, now it is can't resolve the hostname as below.
But it is ok to resolve the hostname in a mean while. Does anyone has the experience about this problem?

vpar1)-s:/#
(vpar1)-s:/#
(vpar1)-s:/#hostname
-s
(vpar1)-s:/#hostname
-s
Hero
4 REPLIES 4
KapilRaj
Honored Contributor

Re: hostname failed.

hv no idea abt vpar's but on a unix node this could have happened by a sysadmin's typo ...

He must have typed
hostname "\-s" or some thing like that

Why dont you fix it ?

hostname # This willl set the hostname as "host_name"

Regds,

Kaps
Nothing is impossible
Sundar_7
Honored Contributor

Re: hostname failed.

yeah, looks like a typo.

correct the hostname using the hostname command and edit the /etc/rc.config.d/netconf to make the changes permanent.
Learn What to do ,How to do and more importantly When to do ?
T G Manikandan
Honored Contributor

Re: hostname failed.

What is the real hostname you have assigned to the system.if that is

(vpar1)-s --It is 9 characters.
HP does not recommend using hostname more than 8 in length


why do you need to use special characters with your hostname configuration that too with hyphens ..

Do you have a standard format like that.
I would recommend using underscore instead of a hyphen.

really not sure what hp recommends.
Bill Hassell
Honored Contributor

Re: hostname failed.

It looks like someone typed the command:

hostname -s myhost

In HP-UX, there is no option for hostname such as -s. Perhaps some root user got confused with uname -S (note, not -s). If this value persists after a reboot, it has been configured into the start/stop scripts.

The hostname is set on bootup by a variable in /etc/rc.config.d/netconf. Edit this file to fix your problem. It should read something like this:

HOSTNAME="mycomputer"


Bill Hassell, sysadmin