- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- can telnet to ipaddr but not to name in /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
09-14-2005 05:48 AM
09-14-2005 05:48 AM
I went to run swinstall and it couldnt find the target machine. I tested telnet from that machine. can telnet to an IPaddr but not a host in the /etc/hosts file. Can anyone tell me what I forgot or more-likely fat-fingered
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2005 05:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2005 05:59 AM
09-14-2005 05:59 AM
Re: can telnet to ipaddr but not to name in /etc/hosts
Check the nslookup tool output
nslookup
It is telling you about where to get the information (e.g. using hosts file or DNS) and the results, if there were any.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2005 05:59 AM
09-14-2005 05:59 AM
Re: can telnet to ipaddr but not to name in /etc/hosts
Can you do a nslookup on the remote host where you are able to connect, if not then you need to check the resolv.conf and nsswitch.conf file. In nsswitch.conf you should have files and dns (if you are using dns).
Rgds
HGN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2005 06:12 AM
09-14-2005 06:12 AM
Re: can telnet to ipaddr but not to name in /etc/hosts
If you don't have a nsswitch.conf but do have a resolv.conf, hp will default to using DNS for name resolution.
If that's the case, do the following:
cp /etc/nsswitch.files /etc/nsswitch.conf
perl -pi -e '/^hosts:\s+.*/hosts: files [ notfound=continue tryagain=continue ] dns
HTH;
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2005 06:13 AM
09-14-2005 06:13 AM
Re: can telnet to ipaddr but not to name in /etc/hosts
ping the machine by hostname and see if it agrees with the ip address in the hosts file.
Even if the ping fails, it will usually tell you the address of what it is you're trying to hit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2005 06:14 AM
09-14-2005 06:14 AM
Re: can telnet to ipaddr but not to name in /etc/hosts
[triumph{root}:/]>cat /etc/resolv.conf
domain danahertm.com
nameserver 129.196.218.22
nameserver 129.196.128.126
[triumph{root}:/]>cat /etc/nsswitch.conf
aliases: files
automount: files
group: files
hosts: files
netgroup: files
networks: files
passwd: files
protocols: files
publickey: files[NOTFOUND=return UNAVAIL=continue]
rpc: files
services: files
ipnodes: files[NOTFOUND=return UNAVAIL=return TRYAGAIN=return] files
[triumph{root}:/]>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2005 06:15 AM
09-14-2005 06:15 AM
Re: can telnet to ipaddr but not to name in /etc/hosts
perl -pi -e 's/^hosts:.*/hosts: files [ notfound=continue tryagain=continue ] dn
s/g' nsswitch.conf
sorry 'bout that.
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2005 06:21 AM
09-14-2005 06:21 AM
Re: can telnet to ipaddr but not to name in /etc/hosts
your nameservers are configured, but not used.
nsswitch.conf should look like this:
...
hosts: dns [NOTFOUND=continue] files
...
(first ask DNS server, than looks up the hosts file - configure as you like)
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2005 06:24 AM
09-14-2005 06:24 AM
Re: can telnet to ipaddr but not to name in /etc/hosts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2005 06:32 AM
09-14-2005 06:32 AM
Re: can telnet to ipaddr but not to name in /etc/hosts
1. Your nsswitch.conf should atleast look like this:
triumph{root}:/]>cat /etc/nsswitch.conf
aliases: files
automount: files
group: files
hosts: files dns
netgroup: files
networks: files
passwd: files
protocols: files
publickey: files[NOTFOUND=return UNAVAIL=continue]
rpc: files
services: files
ipnodes: files[NOTFOUND=return UNAVAIL=return TRYAGAIN=return] files
[triumph{root}:/]>
2. Check your hostname with hostname command.
# hostname
Does return the same name that you specified in /etc/hosts
If not you may have to set hostname first. You can use "set_parms hostname" command for the same but this will reboot the server.
3. Verify your /etc/resolv.conf file and see that you only have domain name and nameservers information in that.
Hope that helps.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2005 06:39 AM
09-14-2005 06:39 AM
Re: can telnet to ipaddr but not to name in /etc/hosts
manually rebuilt per this thread (many thanks)
Now I can telnet by name. Now onto swinstall !!
Again - Many thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2005 06:43 AM
09-14-2005 06:43 AM