Operating System - HP-UX
1820042 Members
3346 Online
109608 Solutions
New Discussion юеВ

Re: nodename greater than 8 charecters --error

 
SOLVED
Go to solution
Ratzie
Super Advisor

nodename greater than 8 charecters --error

My server has a host name greater than 8 characters. When it logs in I get...
Welcome to unknown...

The nodename fails on boot with this error...
Nodename must be less than9 characters
EXIT CODE: 1
"/sbin/rc1.d/S320hostname start" FAILED

How do I fix this?
7 REPLIES 7
Patrick Wallek
Honored Contributor

Re: nodename greater than 8 charecters --error

Umm..... Make the nodename so it is 8 characters of fewer.

HP-UX does not like haveing the nodename greater than 8 characters longs.
James A. Donovan
Honored Contributor

Re: nodename greater than 8 charecters --error

HP-UX doesn't support hostnames logner than 8 characters. You need to run "/sbin/set_parms hostname" to change it to something shorter.
Remember, wherever you go, there you are...
Ratzie
Super Advisor

Re: nodename greater than 8 charecters --error

Sorry, I did not come up with this name.

If there is no way around it I will have to...
Jeff Schussele
Honored Contributor

Re: nodename greater than 8 charecters --error

Hi Laura,

Although HP supports hostnames up to 63 characters, using >8 will break commands such as uname & services such as UUCP.
In fact all S320hostname runs is
uname -S
to set the hostname.
Try the command manually
uname -S host_longer_than_8
and see what error message you get back.

Won't cause any major problems, but lots of irritating ones like you've found.

Try to convince mgmnt to change the name to <= 8 chars & all will be well again.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Steven E. Protter
Exalted Contributor

Re: nodename greater than 8 charecters --error

HP-UX does not support hostnames greater than 8 characters.

You must change the hostname entry in /etc/rc.config.d/ to less than 8 characters.

hostname=jerusalem is not acceptable
hostname=hebron is acceptable
hostname=hebron.juf.net is acceptable.


After making the change, best to restart the machine. Watich out for typos.

SEP
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
Bill Hassell
Honored Contributor
Solution

Re: nodename greater than 8 charecters --error

The network hostname is NOT the same as the hostname. (isn't that easy to understand?) Well, here's the reason:

uname -n

is the UUCP hostname which is a mandatory 8 characters. From the man page for uname:

"Many types of networking services are supported on HP-UX, each of
which uses a separately assigned system name and naming convention.
To ensure predictable system behavior, it is essential that system
names (also called host names or node names) be assigned in such a
manner that they do not create conflicts when the various networking
facilities interact with each other."

In other words, UUCP and TCP/IP (and a bunch of others) will define naming rules. HOWEVER, there is a workaround. The file /etc/rc.config.d/netconf has the entry for UUCP hostname:

HOSTNAME="yoda"

However, when the system starts, there is a test (unfortunately NEVER documented except in the start script: /sbin/init.d/hostname) for the variable NODENAME which, if set, will be the uname -n or UUCP name. So if you change /etc/rc.config.d/netconf to read something like this:

HOSTNAME="yodamaster"
NODENAME="yoda"

then HP-UX will be quite happy. Your hostname for TCP/IP networking will be 10 characters long (or whatever you need) but the UUCP name will an acceptable 8 characters. Note also in the start script, there is specific code to strip out dotted notation for hostname so:

HOSTNAME="yodamaster.obiwan.com"

will produce a hostname of "yodamaster". And also note that the /etc/hosts file is used to provide additional names, both simple and fully qualified. Be sure to include the short NODENAME as well as the long name and always use files then DNS for name resolution. So you can indeed have a truly awful name like:

HOSTNAME="sdfgtyuwnmbuior678rjk"

as long as you set NODENAME to an 8 character shortname like "sdfgtyuw" which is much easier to remember. ;-)


Bill Hassell, sysadmin
rick jones
Honored Contributor

Re: nodename greater than 8 charecters --error

Now, once you use the excellent advice from Bill, you should also be on the lookout for broken scripts and/or programs that are using the name from the uname/ustsys namespace when they really should be using the name from the hostname/gethostname namespace. That is, anything doing TCP/IP should be using the "hostname" command in scripts, or gethostname() call in programs.
there is no rest for the wicked yet the virtuous have no pillows