- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: gethostbyname not working, nslookup on same ho...
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
Discussions
Discussions
Discussions
Forums
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
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
тАО05-05-2004 02:33 AM
тАО05-05-2004 02:33 AM
I'm having a strange problem on my hpux 11i system.
My dns is configured to start looking in the host file, if unsuccessfull the dns is queried.
The problem is with some hosts, when I try to resolve them by their name, gethostbyname fails, but nslookup doesn't for the same node.
If I manually add the node to the /etc/hosts file, both work.
Anyone heard of this?
Thank you
Uffe
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2004 02:39 AM
тАО05-05-2004 02:39 AM
Re: gethostbyname not working, nslookup on same host work fine
after the host entry do you have NOTFOUND=continue and UNAVAIL=continue r do you have return instead of continue .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2004 02:49 AM
тАО05-05-2004 02:49 AM
Re: gethostbyname not working, nslookup on same host work fine
Look at the resolv.conf file on your system and see if the domain name or the search order is defined correctly. If that is okay then look at the configuration file on your dns.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2004 03:02 AM
тАО05-05-2004 03:02 AM
Re: gethostbyname not working, nslookup on same host work fine
hosts: files [NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=return TRYAGAIN=return]
My search domains should be ok
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2004 03:07 AM
тАО05-05-2004 03:07 AM
Re: gethostbyname not working, nslookup on same host work fine
Just an idea
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2004 03:11 AM
тАО05-05-2004 03:11 AM
Re: gethostbyname not working, nslookup on same host work fine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2004 03:17 AM
тАО05-05-2004 03:17 AM
Solutionchange your "hosts" line in nsswitch.conf to look like this:
hosts: files [NOTFOUND=continue UNAVAIL=continue FOUND=return] dns [NOTFOUND=return UNAVAIL=return TRYAGAIN=return FOUND=return] files
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2004 03:52 AM
тАО05-05-2004 03:52 AM
Re: gethostbyname not working, nslookup on same host work fine
I don't quite understand why, but it did the trick
Thank you, you'll be in my prayer tonight ;o)
Uffe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2004 12:32 AM
тАО05-06-2004 12:32 AM
Re: gethostbyname not working, nslookup on same host work fine
A trick to use for debugging this kind of problem is "nsquery hosts" followed by the hostname you are looking for.
Example,
jbox# nsquery hosts www.atl.hp.com
Using "files [NOTFOUND=continue] dns" for the hosts policy.
Searching /etc/hosts for www.atl.hp.com
www.atl.hp.com was NOTFOUND
Switch configuration: Allows fallback
Searching dns for www.atl.hp.com
Hostname: www.atl.hp.com
Aliases:
Address: 15.51.240.8
Switch configuration: Terminates Search
jbox#
Best regards, Brian Hackley