- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: NSSWITCH conf 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
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
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
10-07-2014 03:15 AM - last edited on 10-07-2014 10:13 PM by Lisa198503
10-07-2014 03:15 AM - last edited on 10-07-2014 10:13 PM by Lisa198503
Hi,
We were having problem with DNS server and because of that we were not able to ping the localhost. But we have already added localhost entry in /etc/hosts file. And also we have set the search preference in /etc/nsswitch.conf as files first and then to look DNS.
So trying to understand why it was looking for DNS for localhost ping as it was already in /etc/hosts file. But after DNS server problem was fixed we were able to ping the localhost.
Please find the /etc/nsswitch.conf and /etc/resolv.conf file entries as below and let me know how we can fix this problem. As later on again if we had similar problem with DNS server it should have resolved through /etc/hosts file and no need to look to resolve through DNS for localhost.
server1:/# ping localhost
PING localhost.company.pvt: 64 byte packets
----localhost.company.pvt PING Statistics----
10 packets transmitted, 0 packets received, 100% packet loss
server1:/# cat /etc/nsswitch.conf
passwd: compat
group: compat
hosts: files [NOTFOUND=continue] dns
ipnodes: dns [NOTFOUND=return] nis [NOTFOUND=return] files
networks: nis [NOTFOUND=return] files
protocols: nis [NOTFOUND=return] files
rpc: nis [NOTFOUND=return] files
publickey: nis [NOTFOUND=return] files
netgroup: nis [NOTFOUND=return] files
automount: files nis
aliases: files nis
services: nis [NOTFOUND=return] files
server1:/# cat /etc/resolv.conf
domain company.pvt
nameserver 10.x.x.x
nameserver 10.x.x.x
Thanks,
Narendra
P.S. This thread has been moved from HP-UX>System Administration to HP-UX > networking. -HP Forum Moderator
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2014 06:16 AM - edited 10-07-2014 06:16 AM
10-07-2014 06:16 AM - edited 10-07-2014 06:16 AM
SolutionI think your problem may be related to the 'ipnodes' line in your nsswitch.conf file. This line can also have an impact on how things are looked up.
Both the hosts line and the ipnodes line should be the same. So, I would change the ipnodes line so that it looks like:
ipnodes: files [NOTFOUND=continue] dns