<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Bad : The hostname and canonical name for this host are not consistent when checked from a Java in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Bad-The-hostname-and-canonical-name-for-this-host-are-not/m-p/86871#M35816</link>
    <description>&lt;P&gt;Just a quick clarification, the DnsTest code calls straight the Java getHostName() and&amp;nbsp;&lt;SPAN class="memberNameLink"&gt;getCanonicalHostName&lt;/SPAN&gt;&lt;SPAN&gt;() methods to retrieve the values. The reported mismatch was either caused by the name resolution settings at that time or by nscd caching the old values on the host.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Feb 2019 14:41:37 GMT</pubDate>
    <dc:creator>gzigldrum</dc:creator>
    <dc:date>2019-02-25T14:41:37Z</dc:date>
    <item>
      <title>Bad : The hostname and canonical name for this host are not consistent when checked from a Java proc</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Bad-The-hostname-and-canonical-name-for-this-host-are-not/m-p/86820#M35814</link>
      <description>&lt;P&gt;Good evening. This message I receive after add two new hosts to the hadoop cluser.&lt;/P&gt;&lt;P&gt;Tehnical info:&lt;/P&gt;&lt;PRE&gt;Nodes - Debian GNU/Linux 8.9 (jessie)
cloudera-manager-agent            5.13.0-1.cm5130.p0.55~jessie-cm5 amd64
cloudera-manager-daemons          5.13.0-1.cm5130.p0.55~jessie-cm5 all&lt;/PRE&gt;&lt;P&gt;Earlier we add nodes using web interface. But this 2 nodes was added by hand:&lt;/P&gt;&lt;P&gt;1. Add repo cloudera&lt;/P&gt;&lt;P&gt;2. Install packages from repo&lt;/P&gt;&lt;P&gt;3. Configure /etc/cloudera-scm-agent/config.ini:&lt;/P&gt;&lt;PRE&gt;server_host=hadoop-server.test.com&lt;/PRE&gt;&lt;P&gt;After start clouder agents, I saw tho strangeness In cloudera web interface:&lt;/P&gt;&lt;P&gt;1. All Hosts - my new host - CDH Version is None&lt;/P&gt;&lt;P&gt;2. Error from topic: "The hostname and canonical name for this host are not consistent when checked from a Java process."&lt;/P&gt;&lt;P&gt;I dont know &lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;is connected to each other this issues or not.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;I try resolve second issue:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;python -c 'import socket; print socket.getfqdn(), socket.gethostbyname(socket.getfqdn())'

regensburg.test.com 1.1.1.1&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;This command use from /etc/cloudera-scm-agent/config.ini file. Response is valid - A indicate to this IP and PTR indicate to domain name.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;But, from internet space I found this command and it return other response:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;java -classpath /usr/share/cmf/lib/agent-5.*.jar com.cloudera.cmon.agent.DnsTest
{"status": "0", "ip": "1.1.1.1", "hostname": "regensburg", "canonicalname": "regensburg.test.com", "localhostDuration": "4", "canonicalnameDuration": "1" }&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;Ok, hostname is short.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;root@regensburg ~ # hostname
regensburg

root@regensburg ~ # hostname -f
regensburg.test.com&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;In /etc/hosts we had some records:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;1.1.1.1 regensburg.test.com regensburg&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;Why arise this error? In other nodes we didn't receive this error, some info from working node:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;root@berlin ~ # python -c "import socket; print socket.getfqdn(); print socket.gethostbyname(socket.getfqdn())"
berlin.test.com
2.2.2.2

java -classpath /usr/share/cmf/lib/agent-5.*.jar com.cloudera.cmon.agent.DnsTest
{"status": "0", "ip": "2.2.2.2", "hostname": "berlin.test.com", "canonicalname": "berlin.test.com", "localhostDuration": "4", "canonicalnameDuration": "0" }

root@berlin ~ # hostname
berlin

root@berlin ~ # hostname -f
berlin.test.com

root@berlin ~ # cat /etc/hosts | grep berli
2.2.2.2		berlin.test.com berlin

root@berlin ~ # dpkg -l | grep clouder
ii&amp;nbsp; cloudera-manager-agent&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.13.0-1.cm5130.p0.55~jessie-cm5&amp;nbsp;&amp;nbsp; amd64&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The Cloudera Manager Agent
ii&amp;nbsp; cloudera-manager-daemons&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.13.0-1.cm5130.p0.55~jessie-cm5&amp;nbsp;&amp;nbsp; all&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Provides daemons for monitoring Hadoop and related tools.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From com.cloudera.cmon.agent.DnsTest&amp;nbsp; on all other nodes we receive FQDN hostname, but on this new - short hostname. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 16:58:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Bad-The-hostname-and-canonical-name-for-this-host-are-not/m-p/86820#M35814</guid>
      <dc:creator>unix196</dc:creator>
      <dc:date>2019-02-22T16:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Bad : The hostname and canonical name for this host are not consistent when checked from a Java</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Bad-The-hostname-and-canonical-name-for-this-host-are-not/m-p/86842#M35815</link>
      <description>&lt;P&gt;very strange - today error about the bad hostname have gone. This issue appear in 14 february (after input new hosts to cluster) and only dissappeared 23 february. I think that this some cache on the side of Cloudera soft.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Feb 2019 15:49:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Bad-The-hostname-and-canonical-name-for-this-host-are-not/m-p/86842#M35815</guid>
      <dc:creator>unix196</dc:creator>
      <dc:date>2019-02-23T15:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Bad : The hostname and canonical name for this host are not consistent when checked from a Java</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Bad-The-hostname-and-canonical-name-for-this-host-are-not/m-p/86871#M35816</link>
      <description>&lt;P&gt;Just a quick clarification, the DnsTest code calls straight the Java getHostName() and&amp;nbsp;&lt;SPAN class="memberNameLink"&gt;getCanonicalHostName&lt;/SPAN&gt;&lt;SPAN&gt;() methods to retrieve the values. The reported mismatch was either caused by the name resolution settings at that time or by nscd caching the old values on the host.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 14:41:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Bad-The-hostname-and-canonical-name-for-this-host-are-not/m-p/86871#M35816</guid>
      <dc:creator>gzigldrum</dc:creator>
      <dc:date>2019-02-25T14:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Bad : The hostname and canonical name for this host are not consistent when checked from a Java</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Bad-The-hostname-and-canonical-name-for-this-host-are-not/m-p/86905#M35817</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/32437"&gt;@unix196&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good to see issue got resolved &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In addition to above response, I faced the same due to dns misconfig and dns server caching.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Feb 2019 08:53:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Bad-The-hostname-and-canonical-name-for-this-host-are-not/m-p/86905#M35817</guid>
      <dc:creator>Consult</dc:creator>
      <dc:date>2019-02-26T08:53:37Z</dc:date>
    </item>
  </channel>
</rss>

