1834804 Members
2914 Online
110070 Solutions
New Discussion

Re: Hostname trouble

 
Ron Irving
Trusted Contributor

Hostname trouble

Hello all!!

I have a problem that has consumed me. My N4000 running 11i ver 1 has issues. I added a Gigabit NIC to it, and now it doesn't want to keep it's hostname when rebooted. Along with that, inetd doesn't load, so no one can telnet to it. Once I start these services manually, (set_parms hostname, and inetd,) everything 'seems' to run ok, but there may be some related application issues.

I have disabled the original 10/100 NIC, and made the proper entries in the netconf file. Also, swagentd doesn't load. Is there a step I've missed?

thanks!!
Should have been an astronaut.
36 REPLIES 36
Steven E. Protter
Exalted Contributor

Re: Hostname trouble

Shalom,

Check /etc/rc.config.d/netconf

HOSTNAME settings in there.

If your hostname is more than 8 characters, your system will have NO hostname.

Pick one with 8 or less characters.

Your symptom is typical of having exceeded HP-UX hostname length limitations.

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
TTr
Honored Contributor

Re: Hostname trouble

Verify all the changes that you made. Double check the hosts, netconf, resolv.conf and nsswitch.conf files in /etc. Look for errors in /etc/rc.log and syslog and post them here.
Ron Irving
Trusted Contributor

Re: Hostname trouble

Thank you for your reply!!

HOSTNAME="N4000"

So, that's not it.
Should have been an astronaut.
Ron Irving
Trusted Contributor

Re: Hostname trouble

In the syslog, I see:

unknown vmd[2127]: gethostbyname failed

In /etc/rc.log there's a couple of things that failed.

/sbin/rc1.d/S093vxvm-reconfig[48]: /etc/vx/lib/vxcommon: not found
"/sbin/rc1.d/S093vxvm-reconfig start" FAILED

cleaning up uucp
/var/spool/uucp directory unreadable
ERROR CODE 1
"/sbin/rc2.d/S202clean_uucp start" FAILED

Running /usr/lib/sw/mx/configure to reset hostname.
NOTE: Can not find fully qualified hostname with nslookup. Using unknown.
ERROR: Failed to package AgentConfig into /var/opt/mx/depot11.
swpackage did not run or produced no output.
ERROR: Failed to package AgentConfig into /var/opt/mx/depot10.
swpackage did not run or produced no output.
WARNING: Could not properly configure SD into ServiceControl.
You may try again later by running /usr/lib/sw/mx/configure.
"/sbin/rc2.d/S870swagentd start" FAILED

Should have been an astronaut.
Ron Irving
Trusted Contributor

Re: Hostname trouble

Also, the nsswitch.conf and resolv.conf look ok(?) I'll post them here.
Should have been an astronaut.
Ron Irving
Trusted Contributor

Re: Hostname trouble

Here's the resolv.conf
Should have been an astronaut.
TTr
Honored Contributor

Re: Hostname trouble

It looks like your hostname is not setup properly in all places.

> HOSTNAME="N4000"

Is the hostname of this server supposed to be N4000 and does it match the entry in /etc/hosts and in the DNS server?

> I added a Gigabit NIC to it

Was this to replace the builtin LAN interface or was this an add on?

Post the netconf and hosts files.
Ron Irving
Trusted Contributor

Re: Hostname trouble

Hi again!!

This is an add-on. I've disabled the built-in 10/100 NIC.

I've attached the netconf.
Should have been an astronaut.
Ron Irving
Trusted Contributor

Re: Hostname trouble

And here's the /etc/hosts file.

Thanks again!!

ron
Should have been an astronaut.
Robert-Jan Goossens
Honored Contributor

Re: Hostname trouble

Hi Ron,

Also check your /etc/rc.config.d directory for "old" or duplicate files, for example netconf.old etc.

Best regards,
Robert-Jan
Ron Irving
Trusted Contributor

Re: Hostname trouble

Hi!!

No duplicate files are there...this is perplexing.
Should have been an astronaut.
TTr
Honored Contributor

Re: Hostname trouble

The bottom of your netconf file index is wrong.

IP_ADDRESS[1]=10.1.1.65
SUBNET_MASK[1]=255.255.255.0
INTERFACE_NAME[1]=lan1
BROADCAST_ADDRESS[1]=10.1.1.255
INTERFACE_STATE[1]=up
DHCP_ENABLE[1]=0

The index in each line, [1] should be [0].
Ron Irving
Trusted Contributor

Re: Hostname trouble

However, the lan instance is [1]. I have disabled LAN[0].
Should have been an astronaut.
TTr
Honored Contributor

Re: Hostname trouble

Yes but the route entries stillhave an index of [0].

Since you only have one LAN card, all entries should have the same index and that should be [0] because the /sbin/init.d/net script is set to start at [0] and build yp its LAN loop if there were one.
Ron Irving
Trusted Contributor

Re: Hostname trouble

I hear that!!

So, should I also change the line
INTERFACE_NAME[1]=lan1 to
INTERFACE_NAME[0]=lan0, or
INTERFACE_NAME[0]=lan1

So many 1's and 0's...I feel like binary_man!
Should have been an astronaut.
TTr
Honored Contributor

Re: Hostname trouble

To keep it clean, set them all to [0]. This is just an array index it has nothing to do with lan0. Although setting them all to [1] might work. The /sbin/init.d/net script reads the netconf file and build up a loop starting at [0] and ending at MAX_INDEX. If everything is set to [1] it might still work since nothing is found at [0[ it would probably do nothing. I can't verify it right now.
James R. Ferguson
Acclaimed Contributor

Re: Hostname trouble

Hi Ron:

TTr is correct. Your entries should look like:

IP_ADDRESS[0]=10.1.1.65
SUBNET_MASK[0]=255.255.255.0
INTERFACE_NAME[0]=lan1
BROADCAST_ADDRESS[0]=10.1.1.255
INTERFACE_STATE[0]=up
DHCP_ENABLE[0]=0

'lan1' is the hardware and it is defined as the first (zero-relative) instance. It could just as well be 'lan2' there.

Regards!

...JRF...

Ron Irving
Trusted Contributor

Re: Hostname trouble

Well...here's the plan:

I will set all that to [0], and lan0, and attampt a reboot. It's Sunday, right? I'll just blame it on gremlins.

Points will be issued after the reboot!!

Thanks!!
Should have been an astronaut.
TTr
Honored Contributor

Re: Hostname trouble

I just re-read you last reply. Do not reenable lan0. Use

INTERFACE_NAME[0]=lan1
Ron Irving
Trusted Contributor

Re: Hostname trouble

Thank you!!

Will do!!!

ron
Should have been an astronaut.
Ron Irving
Trusted Contributor

Re: Hostname trouble

Well, I made the changes suggested, and rebooted. Still comes up as 'unknown'. Where to now guys?
Should have been an astronaut.
James R. Ferguson
Acclaimed Contributor

Re: Hostname trouble

Hi (again) Ron:

> Well, I made the changes suggested, and rebooted.

Ah, but from which point in this thread?

> I will set all that to [0], and lan0, and attampt a reboot

If you did that, yes failure was imminent. Please re-read your thread beginning with my original post, and TTr's thereafter.

Regards!

...JRF...
Ron Irving
Trusted Contributor

Re: Hostname trouble

Hi!!

Sorry 'bout that.

INTERFACE_NAME[0]=lan1

everything else in [1] was set to [0]
Should have been an astronaut.
TTr
Honored Contributor

Re: Hostname trouble

The uncommented lines in netconf should look like below. There should be no lan0 and no index other than [0].

I also noticed another discrepancy. I don't know if it is a typo or an intended change.

The original IP at lan0 was 10.1.1.64. The new one at lan1 is 10.1.1.65.

Which one is correct? What ever it is, it should match the /etc/hosts and DNS.

HOSTNAME="N4000"
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1

ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=10.1.1.1
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""

GATED=0
GATED_ARGS=""

RDPD=0
RARP=0

IP_ADDRESS[0]=10.1.1.65
SUBNET_MASK[0]=255.255.255.0
INTERFACE_NAME[0]=lan1
BROADCAST_ADDRESS[0]=10.1.1.255
INTERFACE_STATE[0]=up
DHCP_ENABLE[0]=0