My Oracle Support Banner

Ping Command Does not Resolve Hostname But nslookup Resolves Same Hostname Correctly (Doc ID 2684141.1)

Last updated on JULY 09, 2020

Applies to:

Oracle Cloud Infrastructure - Version N/A and later
Linux x86-64 on Oracle Public Cloud

Symptoms

Pinging the FQDN or short hostname does not resolve to the hostname's IP address:

$ ping <HOSTNAME>.<DOMAIN>
ping: unknown host <HOSTNAME>.<DOMAIN>

But the nslookup command correctly resolves the hostname:

$ nslookup <HOSTNAME>.<DOMAIN>
Server: <DNS-SERVER>
Address: <DNS-SERVER-IP>


Name: <HOSTNAME>.<DOMAIN>
Address: <HOSTNAME-IP-ADDRESS>

/etc/nsswitch.conf is configured with:

hosts files dns

There are no entries in /etc/hosts for the hostname being tested

It can be seen in /var/log/messages that nscd is not able to access /etc/resolv.conf

Jun 24 14:09:03 <HOSTNAME> nscd: 19747 checking for monitored file `/etc/resolv.conf': Permission denied
Jun 24 14:09:18 <HOSTNAME> nscd: 19747 checking for monitored file `/etc/resolv.conf': Permission denied

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.