- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ping localhost fails when resolv.conf present
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-20-2004 09:17 PM
тАО05-20-2004 09:17 PM
I'am trying to install Oracle Application server 10g on HP-UX11i(11.11) and run into the following problem
ping localhost only works when no /etc/resolv.conf is present (for the exception see later)
The last entry in my /etc/hosts is
127.0.0.1 localhost loopback
The resolv.conf looks like
domain milloltingen.ch
nameserver 192.168.2.1
nameserver 192.168.2.2
I have tried to work with the policy mechanism by using /etc/nsswitch.conf
Taking HP default values I can ping any host except localhost and loopback
Interchange dns/files in the hosts line of nsswitch.conf allows to ping localhost and loopback but nothing else
nslookup of any host tells my that the lookup policy of nsswitch.conf is working, but I don't get ping localhost to work
Any idea or does anybody know of a bug with these symptoms
Any suggestions appreciated
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2004 09:20 PM
тАО05-20-2004 09:20 PM
Solutionsomething like this
hosts: files [NOTFOUND=continue UNAVAIL=continue ] dns [NOTFOUN
D=return UNAVAIL=continue TRYAGAIN=return]
This way, the system tries /etc/hosts first where it will find localhost. Just make sure that you don't have any IP addresses in /etc/hosts that conflict with any DNS entries you have.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2004 09:31 PM
тАО05-20-2004 09:31 PM
Re: ping localhost fails when resolv.conf present
Thanks for this real fast answer that already solved the problem:
In my nsswitch.conf I erronously had the entry "files [NOTFOUND=return]..." and therefore it is clear that DNS is not addresses.
After the error has be found, the error mostly seems obvious.
Thanks a lot and best regards
Franz H.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2004 09:35 PM
тАО05-20-2004 09:35 PM
Re: ping localhost fails when resolv.conf present
I am glad that your problem got resolved quickly. In the same lines, i would appreciate if you could take some time off and assign points to Mark, who helped you on this.
Thanks
Mobeen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2004 09:35 PM
тАО05-20-2004 09:35 PM
Re: ping localhost fails when resolv.conf present
what is in the file, /etc/nsswitch.conf is important. copy /etc/nsswitch.hp_defaults to /etc/nsswitch.conf where the following line is found:
# cp -p /etc/nsswitch.hp_defaults /etc/nsswitch.conf
hosts: dns [NOTFOUND=return] nis [NOTFOUND=return] files
will work.
regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2004 09:40 PM
тАО05-20-2004 09:40 PM
Re: ping localhost fails when resolv.conf present
hosts: dns [NOTFOUND=return] nis [NOTFOUND=return] files
change it to:
hosts: files dns [NOTFOUND=return] nis [NOTFOUND=return]
regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2004 09:54 PM
тАО05-20-2004 09:54 PM
Re: ping localhost fails when resolv.conf present
Thank you too for your reply. I also tried this version: works as well
Best regards and thanks
Franz H.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2004 09:33 PM
тАО05-22-2004 09:33 PM
Re: ping localhost fails when resolv.conf present
Having installed the whole Oracle 10g stuff I realized that starting opmnctl lasts very long. So I tried to trace the problem:
Indeed, there still is something wrong with my network configuration:
Eventhough I can ping all the adresses I want, I have no chance to use nslookup when /etc/resolv.conf is present: No feedback at all, I don't even get to the nslookup prompt. What I am doing wrong? Is there a log-file, where I can check what nslookup is trying (no entries in /var/adm/syslog/syslog.log)
Any suggestion will be appreciated.
regards Franz H.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2004 10:33 PM
тАО05-22-2004 10:33 PM
Re: ping localhost fails when resolv.conf present
This would suggest that you either can not connext to the DNS servers sepcified in /etc/resolv.conf or /etc/resolv.conf is wrong or you still have an issue with nsswitch.conf.
If you can, it might be worth posting these last two files to the forum. I'd also suggest creating a new thread on the here because people will see the little "bunny" icon an assume the thread is closed. You won't get so many eyeballs on it :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2004 12:50 AM
тАО05-23-2004 12:50 AM
Re: ping localhost fails when resolv.conf present
Try to recreate those two files. There may be some syntax error or unwanted character.
A simple nsswitch.conf:
hosts: files dns nis
A simple resov.conf
domain xyz.com
nameserver 10.64.21.100
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2004 12:50 AM
тАО05-23-2004 12:50 AM
Re: ping localhost fails when resolv.conf present
Try to recreate those two files. There may be some syntax error or unwanted character.
A simple nsswitch.conf:
hosts: files dns nis
A simple resolv.conf
domain xyz.com
nameserver 10.64.21.100
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 07:08 AM
тАО05-24-2004 07:08 AM
Re: ping localhost fails when resolv.conf present
The files you mention are already that simple as you suggest, but the behaviour of nslookup (no reaction at all) originates from the fact that the namesserver was not up; I would have expected, that in this case the answer of nslookup simply comes from /etc/hosts. This in fact is only true when the namesserver is available.
Eventhough this problem is not really a problem any longer, an Oracle installation (10g Application Server) lasts much longer when there is a /etc/resolv.conf file there. (So, for the time of installation, just move resolv.conf to resolv.conf.sav)
On OS-level querying /etc/hosts or the namesserver doesn't make a big difference.
Thanks to all of you for helping me.
Regards Franz H.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 08:17 AM
тАО05-24-2004 08:17 AM
Re: ping localhost fails when resolv.conf present
nslookup localhost 12.34.56.78
where 12.34.56.78 is your DNS server. In this case, if the server is working, it will report back that it cannot locate localhost: Non-existent domain which is to be expected. So put the non-DNS entries in /etc/hosts, and change nsswitch.conf to always look in /etc/hosts first, then query the nameservers found in resolv.conf. You can also use nsquery (more options) to check you nameservers.
OTE: nslookup will ask the first nameserver if it knowns it's own name. If not, you'll get an error that it cannot validate the nameserver. This is a security check that many DNS admins forget about. DNS is a high security risk so validating the the DNS server is really a legal server is important.
Bill Hassell, sysadmin