Operating System - HP-UX
1836593 Members
3454 Online
110102 Solutions
New Discussion

Re: System Hostname Error.

 
SOLVED
Go to solution
Shahbaz_1
Regular Advisor

System Hostname Error.

Hi Friends,
I don't know, whether to ask this Solaris, quetion in this forum ...

Actually the problem is,
System is not picking up "HOSTNAME", and /var/adm/messages logfile says,
-f snmpdx: unable to get my IP address: gethostbyname(-f) failed [h_errno: host not found(1)]

$hostname --- it shows -f , whereas the hostname is different. I checked in /etc/hosts and it is ok.

And when I am using hostname to ping,
#ping ftest ------ it is ok

Please any clue/idea ...

Thanks in Adv Regards

Regards
Shah

Let's share the great thing "THE KNOWLEDGE"
7 REPLIES 7
Michael Tully
Honored Contributor

Re: System Hostname Error.

Hi Shah,

Not being a Sun person, this has the classic symptoms of a problem with hostname resolution. Check to see if there is an equivalent to '/etc/resolv.conf' and '/etc/nsswitch.conf'.
Failing that you could have a look in the sun forums....

http://forum.sun.com/
http://supportforum.sun.com/
http://www.sun.com/bigadmin/

HTH
Michael
Anyone for a Mutiny ?
T G Manikandan
Honored Contributor

Re: System Hostname Error.

Shabaz,
check your network card file.

Just do a
#ifconfig -a

just find out the interface name ex.hme0

then check your /etc/hme0 file to find whether the right hostname is given in that file.
If it is not,change that to the right hostname.

THis message comes from the Sun Solstice Enterprise Master Agent

check for /etc/snmp/conf directory files whether the hostname is not set in those files

Thanks

Shahbaz_1
Regular Advisor

Re: System Hostname Error.

Thanks Manikandan,
I did,
# ifconfig -a
lo0: flags=849 mtu 8232
inet 127.0.0.1 netmask ff000000
hme0: flags=863 mtu 1500
inet 10.7.1.245 netmask ffffff00 broadcast 10.7.1.255
ether 8:0:20:e6:ac:ee

But didn't find any /etc/hme0 files and I check /etc/snmp/conf, but didn't find hostname in any of these files.

please ...

Regards
Shah

Let's share the great thing "THE KNOWLEDGE"
T G Manikandan
Honored Contributor
Solution

Re: System Hostname Error.

Hello,
The file is /etc/hostname.hme0.

everything should be ok on the system.

Are you using NNM or that type of openview products in your network.
I probably feel that some NNM is querying the host freqently and that gives this message.
Ceesjan van Hattum
Esteemed Contributor

Re: System Hostname Error.

Mayby you have an inproper /etc/nsswitch.conf ;which does not listen to /etc/hosts.

does it show
hosts: dns [NOTFOUND=return] nis [NOTFOUND=return] files

In case you have nsswitch.conf but are unfamiliair with DNS, then rename this file or set 'files' to the front.

Succes,
Ceesjan
Shahbaz_1
Regular Advisor

Re: System Hostname Error.

Thanks everybody for your inputs.

My problem is resolved. What I did
#hostname
and reboot the server. and after server-boot I checked the hostname, and it was correct.


Regards
Shah
Let's share the great thing "THE KNOWLEDGE"
Shahul
Esteemed Contributor

Re: System Hostname Error.

Hi Shahbaz


U solved ur problem..Good. Anyway, Here U can get more information about sun Solaris

http://www.sun.com/bigadmin/discussions/index.html

Best of luck
Shahul