- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Novice Question /etc/hosts
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
08-22-2004 10:24 PM
08-22-2004 10:24 PM
Novice Question /etc/hosts
I'm having the common "The Desktop Messaging System Could Not Be Started" problem. Reading the threads it looks like I should check the /etc/hosts file contents are correct.
I can get into falesafe mode. And I can get into the etc directory. And using the ls command I can see the hosts file. But I have no idea how to display the contents or edit them.....Any hints on how I do that?
Cheers
Phil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2004 10:27 PM
08-22-2004 10:27 PM
Re: Novice Question /etc/hosts
cat /etc/hosts
or
more /etc/hosts
To edit the file
vi /etc/hosts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2004 10:28 PM
08-22-2004 10:28 PM
Re: Novice Question /etc/hosts
You can list the contents of the file with the "cat" command: -
cat /etc/hosts
To edit the file, you need to use the "vi" command. However I recommend you read up on "vi" commands before you do, as it's not intuitive for the beginner.
Before you try and edit the file, take a copy with the command: -
cp /etc/hosts /etc/hosts.backup
So if you do break it you can recover it.
There's a basic intro to vi here: -
http://www.msn.fullfeed.com/faq/vi.help
Have fun!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2004 10:37 PM
08-22-2004 10:37 PM
Re: Novice Question /etc/hosts
to look at the contents just type
cat
and to edit type
vi
Regards
Franky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2004 10:39 PM
08-22-2004 10:39 PM
Re: Novice Question /etc/hosts
First mount your filesytems,
# mount -a
now you can use vi or more to view your /etc/hosts file.
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2004 02:05 AM
08-23-2004 02:05 AM
Re: Novice Question /etc/hosts
192.168.0.1 coms.mshome.net coms
192.168.0.125 hpunix hpunix
127.0.0.1 localhost loopback
hpunix is the name I entered for the system, and I can ping the ip address (192.168.0.125), but I cant ping the name or the alias (both hpunix). Originally there was no alias but I entered it to see if that was the problem.
Considering the hosts file looks ok any idea what else could be causing the "The Desktop Messaging System Could Not Be Started" message?
Thanks
Phil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2004 04:09 AM
08-23-2004 04:09 AM
Re: Novice Question /etc/hosts
If you're using /etc/hosts for your hostname resolution, make sure your /etc/nsswitch.conf file is configured to look there for the information:
hosts: files
Once you put this nsswitch.conf file in place, what does an nslookup of the hostname or alias return?
Regards,
Dave
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2004 05:35 AM
08-23-2004 05:35 AM
Re: Novice Question /etc/hosts
By default the name resolution policy in HP-UX is
DNS [NOTFOUND=return UNAVAIL=continue]
So if you have /etc/resolv.conf, when you ping hpunix, only your DNS is checked and not /etc/hosts file.
Add the following entries in /etc/nsswitch.conf file
# vi /etc/nsswitch.conf
hosts: dns [ NOTFOUND=continue UNAVAIL=continue SUCCESS=return] hosts
Now you should be able to ping hpunix and possibly your CDE will start working again.
- Sundar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2004 05:40 AM
08-23-2004 05:40 AM
Re: Novice Question /etc/hosts
I think instead of:
hosts: dns [ NOTFOUND=continue UNAVAIL=continue SUCCESS=return] hosts
you meant to say:
hosts: dns [ NOTFOUND=continue UNAVAIL=continue SUCCESS=return] files
I'm sure this is what you meant, but I get nervous about people cutting/pasting stuff from ITRC into their actual files and then having things behave strangely. :)
This is similar to my suggestion of just stripping out all the DNS/NIS/LDAP stuff and just going straight to the /etc/hosts file:
hosts: files
That way the library routines don't spend any time calling the NSS_DNS routines only to find that DNS isn't configured and then falling back to NSS_FILES lookups.
If DNS is configured on the system then I agree with your nsswitch.conf syntax. If it's not, and there are no plans to implement DNS, then it's a bit faster to avoid calling the NSS_DNS library routines every time a hostname or IP address lookup request is processed.
Regards,
Dave
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2004 05:52 AM
08-23-2004 05:52 AM
Re: Novice Question /etc/hosts
Yes , sorry this is what I intended to mention
hosts: dns [ NOTFOUND=continue UNAVAIL=continue SUCCESS=return] files
But, correct me if I am wrong Dave, but I believe he has resolver configured. If not, his attempt to ping hpunix should have succeeded ?
By default, if there is no nsswitch.conf and if there is no /etc/resolv.conf file then /etc/hosts will be used.
He has mentioned, he is not able to ping using /etc/hosts, so I assume he has /etc/resolv.conf file configured.
Am I missing something here ?
-- Sundar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2004 05:57 AM
08-23-2004 05:57 AM
Re: Novice Question /etc/hosts
After spending 8 years in WTEC, I've become conditioned to assume nothing about a customer's environment. :)
You are probably correct about an existing resolv.conf, but that doesn't mean the information in the resolv.conf file is accurate or intentional. I've worked on numerous cases where customers said "we're not using DNS" and then I'd show them their /etc/resolv.conf file and ask them why it was there and they'd say "no idea...one of the other administrators must have copied it from a different system..." or something like that.
In any case, if DNS is being used then I agree with your syntax. If DNS is not being used then I'd bypass DNS in the nsswitch.conf file and just go to /etc/hosts.
Regards,
Dave
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2004 06:03 AM
08-23-2004 06:03 AM
Re: Novice Question /etc/hosts
We are not assuming anything here :-). If there is no /etc/resolv.conf, then he SHOULD be able to ping using the host name entry in /etc/hosts file. He is unable to now, so I am very positive that he has /etc/resolv.conf file configured.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2004 12:38 PM
08-23-2004 12:38 PM
Re: Novice Question /etc/hosts
when ever you get problem on hosts then troubleshoot as,
check /etc/nsswitch.conf file's hosts: entry and
/etc/resolve.conf -- dns
/etc/hosts.conf -- hosts
that will be the key and check hostname with nslookup / nsquery commands
Check this thread for discussions on this,
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=624370
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2004 07:46 PM
08-23-2004 07:46 PM
Re: Novice Question /etc/hosts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2004 08:10 PM
08-23-2004 08:10 PM
Re: Novice Question /etc/hosts
if you got it working ... then just assign points to the people who helped you in doing so
Regards
Franky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2004 03:25 AM
08-24-2004 03:25 AM