<?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: [SOLVED]Java Hdfs Program Fails With Connection Refused in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SOLVED-Java-Hdfs-Program-Fails-With-Connection-Refused/m-p/175876#M61268</link>
    <description>&lt;P&gt;You can execute the following tests bellow, usually the sanbox hdfs is not set to listen to localhost, but to sandbox.hortonworks.com;&lt;/P&gt;&lt;P&gt;hdfs$ hdfs dfs -ls hdfs://sandbox.hortonworks.com/tmp&lt;/P&gt;&lt;P&gt;You can try with localhost and should fail with the same Error: &lt;/P&gt;&lt;P&gt;hdfs$ hdfs dfs -ls hdfs://localhost/tmp&lt;/P&gt;&lt;P&gt;To check, just go to ambari:services:hdfs:configs:Advance and filter for port number 8020;&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2017 10:24:42 GMT</pubDate>
    <dc:creator>emattos</dc:creator>
    <dc:date>2017-05-17T10:24:42Z</dc:date>
    <item>
      <title>[SOLVED]Java Hdfs Program Fails With Connection Refused</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SOLVED-Java-Hdfs-Program-Fails-With-Connection-Refused/m-p/175874#M61266</link>
      <description>&lt;P&gt;Hopefully someone can help me figure out what is going on. &lt;/P&gt;&lt;P&gt;I downloaded Hdp 2.6 for virtualbox and followed the instructions to install and set up. I am running it on Linux Mint 18. I am following along in the 'Hadoop the Definitive Guide' book and I am trying to run one of the examples. Here is the code I wrote from the book:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="15476-idea.png" style="width: 603px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19742iD76CB88403EEFE8E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="15476-idea.png" alt="15476-idea.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I set up my /etc/hosts like this, just following the instructions in the 'Learning the Ropes' tutorial. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="15477-hosts.png" style="width: 465px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19743i54FEB37487FFD341/image-size/medium?v=v2&amp;amp;px=400" role="button" title="15477-hosts.png" alt="15477-hosts.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Following the book I do the following but I am getting a connection refused error. Is something not setup correctly? &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="15479-error.jpeg" style="width: 1177px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19744i911BA35E01F6A8BF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="15479-error.jpeg" alt="15479-error.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any and all help would be GREATLY appreciated. I was up super late last night trying to figure this out with no luck. &lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 10:03:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/SOLVED-Java-Hdfs-Program-Fails-With-Connection-Refused/m-p/175874#M61266</guid>
      <dc:creator>mathfish</dc:creator>
      <dc:date>2019-08-18T10:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: [SOLVED]Java Hdfs Program Fails With Connection Refused</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SOLVED-Java-Hdfs-Program-Fails-With-Connection-Refused/m-p/175875#M61267</link>
      <description>&lt;P&gt;So the above works if I do: &lt;/P&gt;&lt;P&gt;hadoop com/thomp/io/FileSystemCat hdfs://sandbox.hortonworks.com:8020/HadoopPrac/Data/sample.txt&lt;/P&gt;&lt;P&gt;or if I do &lt;/P&gt;&lt;P&gt;hadoop com/thomp/io/FileSystemCat hdfs://172.17.0.2:8020/HadoopPrac/Data/sample.txt&lt;/P&gt;&lt;P&gt;Why is that? I set up hdp 2.6 sandbox on my mac and it works when I just do localhost. Why wouldn't it be the same thing since it is the same install? &lt;/P&gt;&lt;P&gt;Here is a screen shot of the /etc/hosts file on the vm:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="15480-vmhosts.png" style="width: 399px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19741i294178B15B9AE19A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="15480-vmhosts.png" alt="15480-vmhosts.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 10:03:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/SOLVED-Java-Hdfs-Program-Fails-With-Connection-Refused/m-p/175875#M61267</guid>
      <dc:creator>mathfish</dc:creator>
      <dc:date>2019-08-18T10:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: [SOLVED]Java Hdfs Program Fails With Connection Refused</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SOLVED-Java-Hdfs-Program-Fails-With-Connection-Refused/m-p/175876#M61268</link>
      <description>&lt;P&gt;You can execute the following tests bellow, usually the sanbox hdfs is not set to listen to localhost, but to sandbox.hortonworks.com;&lt;/P&gt;&lt;P&gt;hdfs$ hdfs dfs -ls hdfs://sandbox.hortonworks.com/tmp&lt;/P&gt;&lt;P&gt;You can try with localhost and should fail with the same Error: &lt;/P&gt;&lt;P&gt;hdfs$ hdfs dfs -ls hdfs://localhost/tmp&lt;/P&gt;&lt;P&gt;To check, just go to ambari:services:hdfs:configs:Advance and filter for port number 8020;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 10:24:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/SOLVED-Java-Hdfs-Program-Fails-With-Connection-Refused/m-p/175876#M61268</guid>
      <dc:creator>emattos</dc:creator>
      <dc:date>2017-05-17T10:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: [SOLVED]Java Hdfs Program Fails With Connection Refused</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SOLVED-Java-Hdfs-Program-Fails-With-Connection-Refused/m-p/175877#M61269</link>
      <description>&lt;P&gt;dfs.namenode.datanode.registration.ip-hostname-check&lt;/P&gt;&lt;P&gt;If true (the default), then the namenode requires that a connecting datanode's address must be resolved to a hostname. If necessary, a reverse DNS lookup is performed. All attempts to register a datanode from an unresolvable address are rejected. It is recommended that this setting be left on to prevent accidental registration of datanodes listed by hostname in the excludes file during a DNS outage. Only set this to false in environments where there is no infrastructure to support reverse DNS lookup.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 10:42:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/SOLVED-Java-Hdfs-Program-Fails-With-Connection-Refused/m-p/175877#M61269</guid>
      <dc:creator>emattos</dc:creator>
      <dc:date>2017-05-17T10:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: [SOLVED]Java Hdfs Program Fails With Connection Refused</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SOLVED-Java-Hdfs-Program-Fails-With-Connection-Refused/m-p/175878#M61270</link>
      <description>&lt;P&gt;Okay, that makes sense. &lt;/P&gt;&lt;P&gt;And I just checked and on my mac I was actually doing the command:&lt;/P&gt;&lt;P&gt;hadoop com/thomp/io/FileSystemCat /HadoopPrac/Data/sample.txt&lt;/P&gt;&lt;P&gt;which also worked. &lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 23:17:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/SOLVED-Java-Hdfs-Program-Fails-With-Connection-Refused/m-p/175878#M61270</guid>
      <dc:creator>mathfish</dc:creator>
      <dc:date>2017-05-17T23:17:54Z</dc:date>
    </item>
  </channel>
</rss>

