How to troubleshoot DNS and hostname resolution related Issues
book
Article ID: 295379
calendar_today
Updated On:
Products
VMware Tanzu GreenplumGreenplumPivotal Data Suite Non Production EditionVMware Tanzu Data SuiteVMware Tanzu Data Suite
Issue/Introduction
It may be possible to ping and connect to hosts using IP addresses but not possible when using hostnames or fully qualified domain names(FQDN).
This is an issue with resolving the hostname or FQDN to an IP address.
Environment
Cause
Hostname resolution is not correctly configured.
Resolution
Here are a couple of items we can check to find the root cause of each hostname resolving the issue:
Follow the steps below to resolve this issue:
Check the content of /etc/nsswitch.conf file, as this conf file will tell Linux which name-resolving method to use. Verify the "hosts:" entry. See output from "man nsswitch.conf" for more details on the configuration file.
Check /etc/hosts file. This file will enable Linux directly resolve hostnames if "files" is listed as a method for "hosts:" in the nsswitch.conf file.
Check /etc/resolv.conf file. This file specifies the DNS servers to use when resolving hostnames using DNS.
Check if dnsmasq or nscd service is running. These two services can be used for the DNS cache. These services can allow hostname resolving /etc/hosts has no entry and the DNS service has stopped. The reason is that information is cached by one of these services.