<?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: HDFS put failing due to internal IP address use in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/32560#M7404</link>
    <description>FYI: I resolved this by setting the property on the client code....</description>
    <pubDate>Thu, 01 Oct 2015 21:39:44 GMT</pubDate>
    <dc:creator>briandoran</dc:creator>
    <dc:date>2015-10-01T21:39:44Z</dc:date>
    <item>
      <title>HDFS put failing due to internal IP address use</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/32170#M7402</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;have an 7 node cluster (6 datanodes) and I am executing HDFSClient Put from an application outside&amp;nbsp;the cloudera cluster. Internally the&lt;/P&gt;&lt;P&gt;cluster is&amp;nbsp;configured to use an internal IP (172.x.x.x range)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the error below when I issue a hdfs put to the name node ... note the IP&amp;nbsp;returned is&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;172.123.123&lt;/STRONG&gt;&lt;/FONT&gt;&lt;STRONG&gt;.123:50010 &lt;/STRONG&gt;which is the internal ip address&lt;/P&gt;&lt;P&gt;and not accessible from the application host.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;HDFS&lt;/P&gt;&lt;PRE&gt;2015-09-22 19:26:48.292+01:00 INFO [Thread-11] org.apache.hadoop.hdfs.DFSClient - Exception in createBlockOutputStream
org.apache.hadoop.net.ConnectTimeoutException: 60000 millis timeout while waiting for channel to be ready for connect. ch : java.nio.channels.SocketChannel[connection-pending remote=/172.123.123.123:50010]
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:534) ~[hadoop-common-2.7.0.jar!/:na]
at org.apache.hadoop.hdfs.DFSOutputStream.createSocketForPipeline(DFSOutputStream.java:1610) ~[hadoop-hdfs-2.6.0.jar!/:na]
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.createBlockOutputStream(DFSOutputStream.java:1408) [hadoop-hdfs-2.6.0.jar!/:na]
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1361) [hadoop-hdfs-2.6.0.jar!/:na]
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:588) [hadoop-hdfs-2.6.0.jar!/:na]
2015-09-22 19:26:48.292+01:00 INFO [Thread-11] org.apache.hadoop.hdfs.DFSClient - Abandoning BP-383231650-172.16.1.45-1435792324508:blk_1074408707_667883
2015-09-22 19:26:48.316+01:00 INFO [Thread-11] org.apache.hadoop.hdfs.DFSClient - Excluding datanode 172.123.123.123:50010&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wildcard addresses is being used on datanode/namenode&lt;/P&gt;&lt;P&gt;Also, I've tried enabling the following parameter to no avail:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;dfs.datanode.use.datanode.hostname&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;dfs.client.use.datanode.hostname&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Is there any way to make the hostname be returned here instead of that IP?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any pointers&amp;nbsp;appreciated..&amp;nbsp;&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 19:21:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/32170#M7402</guid>
      <dc:creator>briandoran</dc:creator>
      <dc:date>2015-09-22T19:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS put failing due to internal IP address use</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/32205#M7403</link>
      <description>&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;Wildcard addresses is being used on datanode/namenode&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;nbsp;dfs.client.use.datanode.hostname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is your solution here,&amp;nbsp;iff your client hosts will resolve the very same DN hostname&amp;nbsp;but over a different IP. Is that true in your environment?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You mention you've tried this - could you elaborate? This setting needs to be applied at the HDFS client configuration, for it to be properly in effect. Is your 'edge host' that lies out of the cluster, or your Java application (if it is run standalone), configured with this set to true in its hdfs-site.xm/Configuration object?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2015 14:15:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/32205#M7403</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2015-09-23T14:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS put failing due to internal IP address use</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/32560#M7404</link>
      <description>FYI: I resolved this by setting the property on the client code....</description>
      <pubDate>Thu, 01 Oct 2015 21:39:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/32560#M7404</guid>
      <dc:creator>briandoran</dc:creator>
      <dc:date>2015-10-01T21:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS put failing due to internal IP address use</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/32565#M7405</link>
      <description>Glad to hear! Please consider marking this thread as resolved so others with similar problems may find a solution quicker.</description>
      <pubDate>Fri, 02 Oct 2015 02:11:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/32565#M7405</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2015-10-02T02:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS put failing due to internal IP address use</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/45253#M7406</link>
      <description>&lt;P&gt;can you please elborrate ? &amp;nbsp;what u did&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 15:53:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/45253#M7406</guid>
      <dc:creator>manoj10</dc:creator>
      <dc:date>2016-09-19T15:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS put failing due to internal IP address use</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/55666#M7407</link>
      <description>How. Which property in the client code?</description>
      <pubDate>Sun, 11 Jun 2017 09:59:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/55666#M7407</guid>
      <dc:creator>RAVINDRABAJPAI</dc:creator>
      <dc:date>2017-06-11T09:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS put failing due to internal IP address use</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/58373#M7408</link>
      <description>&lt;P&gt;I have the same problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please elaborate on the solution to solve this?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 20:53:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/58373#M7408</guid>
      <dc:creator>renuka20</dc:creator>
      <dc:date>2017-08-02T20:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS put failing due to internal IP address use</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/61688#M7409</link>
      <description>&lt;P&gt;Hi I am facing the same issue . Can anyone shed some light on this please&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 20:39:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/61688#M7409</guid>
      <dc:creator>krishnaM</dc:creator>
      <dc:date>2017-11-09T20:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS put failing due to internal IP address use</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/63116#M7410</link>
      <description>&lt;P&gt;Can you please explain the steps involved to resolve this issue?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2017 09:56:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/63116#M7410</guid>
      <dc:creator>SandeshMendon</dc:creator>
      <dc:date>2017-12-28T09:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS put failing due to internal IP address use</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/77747#M7411</link>
      <description>&lt;P&gt;How did u reslove this issue...&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 19:24:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/77747#M7411</guid>
      <dc:creator>mystreet</dc:creator>
      <dc:date>2018-07-30T19:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS put failing due to internal IP address use</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/78354#M7412</link>
      <description>&lt;P&gt;Since it wasn't really described how exactly did you resolve it... The point is that on the client side (it's important that it's not on the server side), set "dfs.datanode.use.datanode.hostname" in the org.apache.hadoop.conf.Configuration object to value "true". If the Configuration object isn't created by your code (like if Spark creates it, in my case), then it depends on what creates it... see its documentation. But some guesses:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Attempt 1: Set it inside $HADOOP_HOME/etc/hadoop/hdfs-site.xml. Hadoop command line tools use that, your Java application though... maybe not.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Attempt 2: Put $HADOOP_HOME/etc/hadoop/ into the Java classpath (or pack hdfs-site.xml into your project under /src/main/resources/, but that's kind of dirty...). This works with Spark.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Spark only:&amp;nbsp;SparkSession.builder().config("spark.hadoop.dfs.client.use.datanode.hostname", "true").[...]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course, you may also need to add the domain name&amp;nbsp;of the&amp;nbsp;DataNode-s (as the NameNode knows it) into the /etc/hosts&amp;nbsp;on the computer running your application.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Aug 2018 09:18:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-put-failing-due-to-internal-IP-address-use/m-p/78354#M7412</guid>
      <dc:creator>ddekany</dc:creator>
      <dc:date>2018-08-11T09:18:23Z</dc:date>
    </item>
  </channel>
</rss>

