Operating System - HP-UX
1753841 Members
9164 Online
108806 Solutions
New Discussion юеВ

Host name problem.,,,,,,,

 
SOLVED
Go to solution
Kannandgl_1
Frequent Advisor

Host name problem.,,,,,,,

Greetings Friends ,

Hi , i am getting small problem in one of the host.
when ever i am trying to get the host name its showing original name .At the same time i am using uname -a command i am getting below output.Please any one advise to me .. where is node name is taken . i am checking the /etc/rc.config.d/netconf file also ,their correct entry .
=======================================
#uname -a

HP-UX unknown B.11.23 U ia64 4257359972 unlimited-user license
=======================================
13 REPLIES 13
Asif Sharif
Honored Contributor
Solution

Re: Host name problem.,,,,,,,

Hi,

see the below link.

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1145232

Regards,
Asif Sharif
Regards,
Asif Sharif
Raj D.
Honored Contributor

Re: Host name problem.,,,,,,,

Kannandgl,
Check and make sure you have no junk files under /etc/rc.config.d/
- You are not supposed to keep any backup file under /etc/rc.config.d/ , like netconf.old ore netconf.08092010 etc , and it may cause the problem.
- If there is any such file move it and reboot and you can check, most of the time that causes the problem.

Hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: Host name problem.,,,,,,,

Also check with this with debug mode & see what you are getting,

sh -x /sbin/rc1.d/S320hostname

hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Kannandgl_1
Frequent Advisor

Re: Host name problem.,,,,,,,

Dear RAJ,

1.Today i am coping the file same location ..
2.I am posting the Output # sh -x /sbin/rc1.d/S320hostname.

========================
+ PATH=/sbin:/usr/sbin:/usr/bin
+ export PATH
+ rval=0
+ echo usage: /sbin/rc1.d/S320hostname {start}
usage: /sbin/rc1.d/S320hostname {start}
+ exit 0
========================
Raj D.
Honored Contributor

Re: Host name problem.,,,,,,,

Kannan,

Try,

sh -x /sbin/rc1.d/S320hostname start
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: Host name problem.,,,,,,,

I think you can try with stop and start, and see what happens, this script executes in run level 1, so there may be some dependency ,

- Do you see any error in /etc/rc.log
# cat /etc/rc.log | grep -i -e err -e fail

see in /etc/rc.log for the below portion:


Setting hostname
Output from "/sbin/rc1.d/S320hostname start":
----------------------------



- since when you are getting the hostname as unknown, what changed since last time it was working fine.


- check netconf file again.
# cat /etc/rc.config.d/netconf | grep -v ^#

hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Kannandgl_1
Frequent Advisor

Re: Host name problem.,,,,,,,

Dear RAJ,

+ hostname hogisdata2
+ set_return
+ [ -z hogisdata2 ]
+ uname -S hogisdata2
Nodename must be less than 9 characters
+ set_return
EXIT CODE: 1
+ [ -z HP-UX ]
+ setuname -t -s HP-UX
+ set_return
+ exit 1

Regards
Kanna
Kannandgl_1
Frequent Advisor

Re: Host name problem.,,,,,,,

Greetings Raj,

As per your valuable answer, i got the faile error on this node.
========================
cat /etc/rc.log | grep -i -e err -e fail
/sbin/rc1.d/S320hostname start" FAILED
rw-r--r-- 1 root sys 0 Sep 3 2007 swspluninfo.error
=========================

Regards
Kanna
Raj D.
Honored Contributor

Re: Host name problem.,,,,,,,

Kannan,

you have set a wrong host name, you have to limit it to 8 character:

>>
+ uname -S hogisdata2
Nodename must be less than 9 characters
>>



- Change to 8 character hostname:
1. Correct /etc/rc.config.d/netconf entry.
2. Correct /etc/hosts entry.
3. reboot and check.


or
- /sbin/set_parms hostname
And type 8 character hostname, and reboot.

This should fix the issue.



Hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "