Reply
Highlighted
New Contributor
Posts: 3
Registered: ‎03-03-2018

DNS Resolution , BAD health issue

Hi,

I am facing a DNS resolution problem with 2 of my hosts in my cluster.

/etc/hosts file is configured like : ip FQDN hostname for all hosts

python -c "import socket; print socket.getfqdn(); print socket.gethostbyname(socket.getfqdn())"

gives me back the correct values ,

also i can ping each host with hostname normally

But still i cannot avoid this issue about DNS resolution .

Also the hosts IDs are different .

Any ideas pls ?

Posts: 113
Topics: 0
Kudos: 15
Solutions: 11
Registered: ‎01-05-2015

Re: DNS Resolution , BAD health issue

[ Edited ]

Hello,

 

There may be any number of reasons why the system appears to be resolving the hostnames differently. One of the main factors which can affect how DNS resolution occurs on a system is the content of /etc/nsswitch.conf on network enabled calls. Under normal conditions the order listed in this configuration file would be files and then dns but some integration tools or patterns like the use of sssd may alter the ordering of lookups.

 

If you would like to see what the agent is attempting to report to the Host Monitor service you may use the DnsTest class built directly into the agent code, in addition to any python based test. To do this you can use a command similar to the one shown below though you will need to alter the final file naming class path to match your agent version. Note that the output is formated in JSON.

 

[root@master-1 ~]# /usr/java/jdk1.7.0_67-cloudera/bin/java -classpath /usr/share/cmf/lib/agent-5.12.0.jar com.cloudera.cmon.agent.DnsTest
{"status": "0", "ip": "192.0.2.2", "hostname": "master-1.example.com", "canonicalname": "master-1.example.com", "localhostDuration": "10", "canonicalnameDuration": "1" }

Customer Operations Engineer | Security SME | Cloudera, Inc.