1820072 Members
3069 Online
109608 Solutions
New Discussion юеВ

hostname is unknown

 
SOLVED
Go to solution
Andrew_80
Advisor

hostname is unknown

This is a new server and the hostname command is "unknown"
The /etc/rc.log has this error
Setting hostname
Output from "/sbin/rc1.d/S320hostname start":
----------------------------
unknown
usage: uname [-amnrsvil] [-S nodename]
EXIT CODE: 1
"/sbin/rc1.d/S320hostname start" FAILED
and if I try it from command line : root@terra01# /sbin/rc1.d/S320hostname start
unknown
usage: uname [-amnrsvil] [-S nodename]
EXIT CODE: 1

the strange thing is there is an entry in /etc/rc.config.d/netconf
HOSTNAME="terra01"
OPERATING_SYSTEM=-t
LOOPBACK_ADDRESS=127.0.0.1

and everytime I change the OPERATING_SYSTEM to HP-UX and I run the start command it change it back to "-t" I don't know why ???

I tried set_parms hostname twice and the same problem persist. and tried uname -S 'hostname'

Any ideas ? Thank you
The Sky is the Limit
12 REPLIES 12
Steven E. Protter
Exalted Contributor

Re: hostname is unknown

I've seen strange behavior like this if there is an error in /etc/rc.config.d/netconf

Make sure all the entries are correct.

I've also seen the OS freak becuase the hostname was longer than 8 characters, which does not appear to be the case here.
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor
Solution

Re: hostname is unknown

I pulled a few old posts for you that have your exact message in them.

I read some of them and you might get lucky.

http://search.hp.com/redirect.html?url=http%3A//forums.itrc.hp.com/cm/QuestionAnswer/1,,0x2dd27680e012d71190050090279cd0f9,00.html&qt=hostname+%2Bstart%22+%2BFAILED&hit=1

http://search.hp.com/redirect.html?url=http%3A//forums.itrc.hp.com/cm/QuestionAnswer/1,,0x48590b0717d1d5118ff40090279cd0f9,00.html&qt=hostname+%2Bstart%22+%2BFAILED&hit=3


http://search.hp.com/redirect.html?url=http%3A//forums.itrc.hp.com/cm/QuestionAnswer/1,,0x0990e7613948d5118fef0090279cd0f9,00.html&qt=hostname+%2Bstart%22+%2BFAILED&hit=4

http://search.hp.com/redirect.html?url=http%3A//forums.itrc.hp.com/cm/QuestionAnswer/1,,0x4273abe92dabd5118ff10090279cd0f9,00.html&qt=hostname+%2Bstart%22+%2BFAILED&hit=5

http://search.hp.com/redirect.html?url=http%3A//forums.itrc.hp.com/cm/QuestionAnswer/1,,0x80657e990647d4118fee0090279cd0f9,00.html&qt=hostname+%2Bstart%22+%2BFAILED&hit=6

http://search.hp.com/redirect.html?url=http%3A//forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1c98ee3e323bd5118fef0090279cd0f9,00.html&qt=hostname+%2Bstart%22+%2BFAILED&hit=8

http://search.hp.com/redirect.html?url=http%3A//forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf726543254bfd611abdb0090277a778c,00.html&qt=hostname+%2Bstart%22+%2BFAILED&hit=9

Good luck bud.

Steve
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
eran maor
Honored Contributor

Re: hostname is unknown

Hi

i think that mybe your /etc/rc.config.d/netconf file is not good .

rename the file to netconf.orig , copy a new file from /usr/newconfig/etc/rc.config.d/netconf to /etc/rc.config.d/netconf

the value need to be like this :

HOSTNAME=""
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=


remember also to put the param about the lan and the router .

and try to reboot the system .

i didnt found any docs on this issue .

if it will not work can you give us the netconf file for exam.

also check that the /etc/hosts is config correctly .
love computers
Jose Mosquera
Honored Contributor

Re: hostname is unknown

Hi,

Try using /sbin/set_parms and make sure the hostname is properly set. After this, reboot your system.

Also you can check and make sure the /sbin/init.d/hostname exists correctly.

Rgds.
Sridhar Bhaskarla
Honored Contributor

Re: hostname is unknown

Hi Andrew

OPERATING_SYSTEM=-t

That entry "-t" is weird. It should be "HP-UX".

Change it and run "/sbin/init.d/hostname start"

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
T G Manikandan
Honored Contributor

Re: hostname is unknown

I feel the problem should be with the uname unable to retrieve the hostname for the system.

check doing a
#uname -n

check it gives the proper hostname.If it doesn't then


Just do a
#uname -S

Revert
Ravi_8
Honored Contributor

Re: hostname is unknown

Hi,

Hostname in /etc/rc.config.d/netconf and /etc/hosts files must be the same.
The OPERATING_SYSTEM flag in netconf must be HP-UX, whereas you have -t.

From prompt also you can specify hostname
#hostname=terra01,
but this will be a temporary.
never give up
Ravi_8
Honored Contributor

Re: hostname is unknown

Hi,

Hostname in /etc/rc.config.d/netconf and /etc/hosts files must be the same.
The OPERATING_SYSTEM flag in netconf must be HP-UX, whereas you have -t.

From prompt also you can specify hostname
#hostname=terra01,
but this will be a temporary.
never give up
Ravi_8
Honored Contributor

Re: hostname is unknown

Hi,

Hostname in /etc/rc.config.d/netconf and /etc/hosts files must be the same.
The OPERATING_SYSTEM flag in netconf must be HP-UX, whereas you have -t.

From prompt also you can specify hostname
#hostname=terra01,
but this will be a temporary.
never give up
Ravi_8
Honored Contributor

Re: hostname is unknown

Hi,

Hostname in /etc/rc.config.d/netconf and /etc/hosts files must be the same.
The OPERATING_SYSTEM flag in netconf must be HP-UX, whereas you have -t.

From prompt also you can specify hostname
#hostname=terra01,
but this will be a temporary.
never give up
Andrew_80
Advisor

Re: hostname is unknown

Actually the problem was that the /etc/rc.config script corrupted Once it was replaced with a good copy, it worked fine.


Thanks for all of your help
The Sky is the Limit
rick jones
Honored Contributor

Re: hostname is unknown

My initial guess would be that someone edited the S320hostname script and botched it, but as others have noted the "-t" in OPERATING_SYSTEM is rather strange looking, so perhaps the botch is scribbling onto netconf.

Also, a minor but important distinction. The uname command does not set the "Internet" hostname of a system, it sets the UUCP "hostname" of a system.

The Internet hostname of a system is manipulated via the hostname command.

The UUCP namespace and the Internet namespace have rather different constraints on hostnames - for exmaple, their length. While both are being set (iirc) in the S320hostname script, applications should not "mix and match" them - if the app/script is going to do "things Internet" it should use the hostname command, not uname.
there is no rest for the wicked yet the virtuous have no pillows