- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: problem in /etc/hosts file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2007 04:36 AM
09-27-2007 04:36 AM
problem in /etc/hosts file
If I use hostname command and nslookup shows diffrent name and Uname shows diffrent
I'm aslo getting error from Data base team that thye have diffrent hosts name in the profile soem oracle inctanse for example yp0 have 2 profile one shows short hosts name and and other show long ( original name )
thoseare total 4 servers rx2620 and 11.23 OS Installed . before that I had a problem 2 servers was showing shor names and two was showing long name . I corrected with hosts name command now all four server shows right name with hostname command and ns lookup but show diffrenst short name when run uname -a command.
I did not run /sbin/init.d/swagentd stop and start. BCZ their data base is running and I'm not sure it will effect on these databases .
Any one can help me to solve this problem ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2007 04:37 AM
09-27-2007 04:37 AM
Re: problem in /etc/hosts file
Check also permissions of these files.
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2007 04:43 AM
09-27-2007 04:43 AM
Re: problem in /etc/hosts file
10.8.1.5 hostname hostanme.yourdomain.com
your nsswitch.conf should have something like:
hosts: dns [NOTFOUND=CONTINUE] files
Make sure that your /etc/resolv.conf has the correct info as well...
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2007 04:59 AM
09-27-2007 04:59 AM
Re: problem in /etc/hosts file
thier is not /etc/resolve.conf file and no nsswitch.conf file exists .
They did not provide me dns information as well. while the ywill be DNS client in the future .
In the /etc/hosts file their is 4 valn are ,user,utility,managment,data. for which Vlan should have entry for fully qualified name ??
follwing is error from dba guys .
PX1 has a couple of different issues. It has 2 start profiles with different host names. The instance profile does not contain the host name as I know it but a shorter version of the host name. There were a couple of incorrect parameters which I have corrected. Could you resolve the host name issue and restart the system?
PX8 does not have the profile changes. Also, it has duplicate start profiles, one with a short hostname and one with a long hostname. It has an instance profile with a short hostname.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2007 05:11 AM
09-27-2007 05:11 AM
Re: problem in /etc/hosts file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2007 05:17 AM
09-27-2007 05:17 AM
Re: problem in /etc/hosts file
For example in your file you have many ip's pointed to one name:
172.19.138.55 camcps04
172.19.139.55 camcps04
130.178.250.55 camcps04
And change lines like this:
130.178.250.54 camccsd0cps03a cps03a camccsd0cps03 camccsd0cps03.gotd.gm.com
to:
130.178.250.54 camccsd0cps03.gotd.gm.com camccsd0cps03a cps03a camccsd0cps03
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2007 05:17 AM
09-27-2007 05:17 AM
Re: problem in /etc/hosts file
/etc/hosts will not be used for hostname lookups until /etc/nsswitch.conf tells it to do so.
After a HP-UX install, there are a few candidate nsswitch files in /etc
Take the one that best suits your needs and copy to /etc/nsswitch.conf and then files lookups will start to work.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2007 06:00 AM
09-27-2007 06:00 AM
Re: problem in /etc/hosts file
Syntex should be same as you mentioned ?? if I change syntex will this file read in diffrent way ???
Just aksing for my knowledge .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2007 01:49 PM
09-27-2007 01:49 PM
Re: problem in /etc/hosts file
- no resolv.conf and no nsswitch.conf, then only /etc/hosts will provide addresses.
- no nsswitch.conf but a resolv.conf file, then /etc/hosts will never be used.
- nsswitch.conf controls when hosts or DNS (or NIS, etc) will be used. Read the man page for switch.
nslookup provides very little information about the steps, so a better tool is nsquery. Use it like this:
nsquery hosts www.hp.com
NOTE: uname is unrelated to network names. While it is a very good idea to make them the same, read the man page for uname where it talks about hostname versus uname. This is important to understand when you have multiple LAN cards.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2007 05:35 AM
10-01-2007 05:35 AM
Re: problem in /etc/hosts file
When I use sam to modify lan cards I got this msg at the window
system name and the node name differ. The suggested value is listed XXXXXX If the suggested value is okay, press the OK button and the names xx
xxl be reset.Pressing Cancel Button will continue with Current Name Settings.
what is diffrend b/t system name and node mane ??? how can correct them ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2007 05:52 AM
10-01-2007 05:52 AM
Re: problem in /etc/hosts file
Check the variable HOSTNAME (system name) in netconf and compare it with the node name associated in the /etc/hosts file.
Regards;
J. Bravo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2007 03:22 PM
10-01-2007 03:22 PM
Re: problem in /etc/hosts file
The easiest way set this feature is to search for /etc/rc.config.d/netconf:
grep NAME= /etc/rc.config.d/netconf
If your system has different hostname versus uname -n, then there will be a NODENAME= entry as well as a HOSTNAME= entry. You can make remove the NODENAME entry and now the HOSTNAME value will set both values. This will make the change permanent on reboot.
To change your system right now, issue the two commands:
hostname server_name
uname -S server_name
NOTE: the server_name must be less than 8 characters. If you need a longer name for network access, then set NODENAME to the shortname (uname -n) and HOSTNAME to the long name. Note that a fully qualified domain name such as server_name.domain.com wil be truncated to just the simple hostname when you reboot. It is not recommended to use an FQDN for the hostname command.
Note that you can keep short names and add li=ong names to your /etc/hosts file and also into your DNS server if used.
Bill Hassell, sysadmin