<?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: Unable to copy files from NiFi to HDFS in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/236439#M198252</link>
    <description>&lt;P&gt;Hi Geoffrey,&lt;/P&gt;&lt;P&gt;Thank you for your reply. Yes, I added these two files in NiFi. So ListHDFS processor in NiFi is able to show the list of files in HDFS. But PutHDFS can not put files in HDFS. I guess that the communication between NiFi and the namenode is ok, but something wrong between NiFi and the datanode. I can not know what configurations would affect that.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Core-site.xml and hdfs-site.xml&lt;/EM&gt;  are attached.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/110095-hdfs-site.xml" target="_blank"&gt;hdfs-site.xml&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/110067-core-site.xml" target="_blank"&gt;core-site.xml&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The statuses from Ambari are shown below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="110073-1564266231334.png" style="width: 900px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14386i325A3C47706B8B92/image-size/medium?v=v2&amp;amp;px=400" role="button" title="110073-1564266231334.png" alt="110073-1564266231334.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Do you know where to get logs of Namenode and Datanode? &lt;/P&gt;</description>
    <pubDate>Sat, 17 Aug 2019 23:32:36 GMT</pubDate>
    <dc:creator>figo1984</dc:creator>
    <dc:date>2019-08-17T23:32:36Z</dc:date>
    <item>
      <title>Unable to copy files from NiFi to HDFS</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/236436#M198249</link>
      <description>&lt;P&gt;I used NiFi from HDF sandbox (PC A) to copy files to HDFS of HDP sandbox (PC B). NiFi can read files list from HDFS without any error. The flowchart is shown below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="110091-1564116989634.png" style="width: 1004px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14389iCC6FE9E724EC647D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="110091-1564116989634.png" alt="110091-1564116989634.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;However, NiFi can not get files or put files on HDFS, the errors are shown below:&lt;/P&gt;&lt;P style="margin-top:0cm;margin-right:0cm;margin-bottom:8pt;margin-left:0cm;font-size:15px;font-family:'calibri' , sans-serif"&gt;GetHDFS processor error:&lt;/P&gt;&lt;P style="margin-top:0cm;margin-right:0cm;margin-bottom:8pt;margin-left:0cm;font-size:15px;font-family:'calibri' , sans-serif"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="110072-1564117162241.png" style="width: 800px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14390iA25CAFEE62A5EF50/image-size/medium?v=v2&amp;amp;px=400" role="button" title="110072-1564117162241.png" alt="110072-1564117162241.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;PutHDFS processor error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="110082-1564117011391.png" style="width: 602px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14391iEDFB2BEC1B452BF9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="110082-1564117011391.png" alt="110082-1564117011391.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me? Thank you very much.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2019 23:33:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/236436#M198249</guid>
      <dc:creator>figo1984</dc:creator>
      <dc:date>2019-08-17T23:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to copy files from NiFi to HDFS</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/236437#M198250</link>
      <description>&lt;P&gt;&lt;A rel="noopener noreferrer noopener noreferrer" href="http://@Figo%20C" target="_blank"&gt;&lt;EM&gt;@Figo C&lt;/EM&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Can you check running status/logs of datanode/namenode and copy-paste it here.  Did ou add these 2 files to your nifi config &lt;STRONG&gt;Core&lt;/STRONG&gt;-&lt;STRONG&gt;site&lt;/STRONG&gt;.&lt;STRONG&gt;xml&lt;/STRONG&gt; and &lt;STRONG&gt;hdfs&lt;/STRONG&gt;-&lt;STRONG&gt;site&lt;/STRONG&gt;.&lt;STRONG&gt;xml&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jul 2019 03:46:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/236437#M198250</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2019-07-27T03:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to copy files from NiFi to HDFS</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/236438#M198251</link>
      <description>&lt;P&gt;&lt;EM&gt;log of datanode&lt;/EM&gt;:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="110068-1564280499561.png" style="width: 1902px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14387i8625217EDF175E59/image-size/medium?v=v2&amp;amp;px=400" role="button" title="110068-1564280499561.png" alt="110068-1564280499561.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;log of namenode&lt;/EM&gt;:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="110069-1564280676756.png" style="width: 1899px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14388iAD0F6E4766C53C75/image-size/medium?v=v2&amp;amp;px=400" role="button" title="110069-1564280676756.png" alt="110069-1564280676756.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2019 23:32:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/236438#M198251</guid>
      <dc:creator>figo1984</dc:creator>
      <dc:date>2019-08-17T23:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to copy files from NiFi to HDFS</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/236439#M198252</link>
      <description>&lt;P&gt;Hi Geoffrey,&lt;/P&gt;&lt;P&gt;Thank you for your reply. Yes, I added these two files in NiFi. So ListHDFS processor in NiFi is able to show the list of files in HDFS. But PutHDFS can not put files in HDFS. I guess that the communication between NiFi and the namenode is ok, but something wrong between NiFi and the datanode. I can not know what configurations would affect that.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Core-site.xml and hdfs-site.xml&lt;/EM&gt;  are attached.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/110095-hdfs-site.xml" target="_blank"&gt;hdfs-site.xml&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/110067-core-site.xml" target="_blank"&gt;core-site.xml&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The statuses from Ambari are shown below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="110073-1564266231334.png" style="width: 900px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14386i325A3C47706B8B92/image-size/medium?v=v2&amp;amp;px=400" role="button" title="110073-1564266231334.png" alt="110073-1564266231334.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Do you know where to get logs of Namenode and Datanode? &lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2019 23:32:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/236439#M198252</guid>
      <dc:creator>figo1984</dc:creator>
      <dc:date>2019-08-17T23:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to copy files from NiFi to HDFS</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/236440#M198253</link>
      <description>&lt;P&gt;&lt;EM&gt;Core-site.xml and hdfs-site.xml&lt;/EM&gt;  are attached. &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/110085-hdfs-site.xml"&gt;hdfs-site.xml&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/110085-hdfs-site.xml"&gt;&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/110066-core-site.xml"&gt;core-site.xml&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2019 01:16:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/236440#M198253</guid>
      <dc:creator>figo1984</dc:creator>
      <dc:date>2019-07-29T01:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to copy files from NiFi to HDFS</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/236441#M198254</link>
      <description>&lt;P&gt;&lt;A rel="noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer" href="http://@Figo%20C" target="_blank"&gt;&lt;EM&gt;@Figo C&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The reason is by design NiFi as a client communicates with HDFS Namenode on port 8020 and it returns the location of the files using the data node which is a private address. Now that both your HDF and HDF are sandboxes I think you should switch both to host-only-adapter your stack trace will be a statement that the client can’t connect to the data node, and it will list the internal IP instead of 127.0.0.1. That causes the minReplication issue, etc.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Change the HDP and HDF sandbox VM network settings from NAT to Host-only Adapter. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Here are the steps:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1. Shutdown gracefully the HDF sandbox&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;2. Change Sandbox VM network from NAT to Host-only Adapter It will automatically pick your LAN or wireless save the config.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;3. Restart Sandbox VM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;4. Log in to the Sandbox VM and use ifconfig command to get its IP address, in my case 192.168.0.45&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;5. Add the entry in /etc/hosts on my host machine, in my case: 192.168.0.45 sandbox.hortonworks.com&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;6. Check connectivity by telnet: telnet sandbox.hortonworks.com 8020&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;7. Restart NiFi (HDF)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;By default HDFS clients connect to DataNodes using the IP address provided by the NameNode. Depending on the network configuration this IP address may be unreachable by the clients. The fix is letting clients perform their own DNS resolution of the DataNode hostname. The following setting enables this behavior.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If the above still fails make the below changes in the hdfs-site.xml that NiFi is using set dfs.client.use.datanode.hostname to true in your &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;&amp;lt;property&amp;gt;
&amp;nbsp; &amp;lt;name&amp;gt;dfs.client.use.datanode.hostname&amp;lt;/name&amp;gt;
&amp;nbsp; &amp;lt;value&amp;gt;true&amp;lt;/value&amp;gt;
&amp;nbsp; &amp;lt;description&amp;gt;Whether clients should use datanode hostnames when
&amp;nbsp; &amp;nbsp; connecting to datanodes.
&amp;nbsp; &amp;lt;/description&amp;gt;
&amp;lt;/property&amp;gt;&lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Hope that helps&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2019 04:15:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/236441#M198254</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2019-07-29T04:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to copy files from NiFi to HDFS</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/236442#M198255</link>
      <description>&lt;P&gt;Hi Geoffrey, &lt;/P&gt;&lt;P&gt;Thank you very much. The problem is solved. I found that 50010 port (data transfer port to the HDFS Datanode ) is not added to HDP docker container. But the 50070 port (port to the HDFS namenode) is added. So I can read the metadata of Files in HDFS with the ListHDFS processor but can not get from HDFS and put files to HDFS with the two processors. &lt;/P&gt;&lt;P&gt;I am using VirtualBox HDP sandbox, so I still use the default NAT network but changed the IP addresses to the current localhost IP at the setting of Port forwarding.&lt;/P&gt;&lt;P&gt;And access to docker host terminal: &lt;/P&gt;&lt;P&gt;&lt;A href="mailto:root@sandbox-hdp.hortonworks.com" rel="nofollow noopener noreferrer" target="_blank"&gt;root@sandbox-hdp.hortonworks.com&lt;/A&gt; 2200&lt;/P&gt;&lt;P&gt;Modified the sandbox proxy file &lt;U&gt;generate-proxy-deploy-script.sh&lt;/U&gt; (/sandbox/proxy)  &lt;/P&gt;&lt;P&gt;Add 50010 port as follow, then run the shell program, ./&lt;U&gt; generate-proxy-deploy-script.sh, &lt;/U&gt;&lt;/P&gt;&lt;P&gt; &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="110070-1564360642248.png" style="width: 113px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14384i3D93890BAF672A89/image-size/medium?v=v2&amp;amp;px=400" role="button" title="110070-1564360642248.png" alt="110070-1564360642248.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then the proxy-deploy program is updated;&lt;/P&gt;&lt;P&gt;Then run the shell  (./proxy-deploy.sh) to generate a proxy container and start it (docker start sandbox-proxy). &lt;/P&gt;&lt;P&gt;Run NiFi: &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="110098-1564360793410.png" style="width: 1292px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14385iC0DF430187153ABE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="110098-1564360793410.png" alt="110098-1564360793410.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Files are loaded in HDFS at HDP and fetched from HDFS to NiFi local directory:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2019 23:32:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/236442#M198255</guid>
      <dc:creator>figo1984</dc:creator>
      <dc:date>2019-08-17T23:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to copy files from NiFi to HDFS</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/325733#M229711</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm very new with HDP sandbox. I have same issue and I'm trying to solve it. I tried changing network settings from NAT to Host Only but it doesn't work, I have this while the VM is starting:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="himock_0-1632936081775.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/32488i265AD415E68213D3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="himock_0-1632936081775.png" alt="himock_0-1632936081775.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now I'm trying your solution, but what do you mean with "&lt;SPAN&gt;I still use the default NAT network but changed the IP addresses to the current localhost IP at the setting of Port forwarding&lt;/SPAN&gt;". How can I do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 17:23:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/325733#M229711</guid>
      <dc:creator>himock</dc:creator>
      <dc:date>2021-09-29T17:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to copy files from NiFi to HDFS</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/325774#M229715</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/92370"&gt;@himock&lt;/a&gt;&amp;nbsp;as this is an older post, you would have a better chance of receiving a resolution by&lt;A href="“https://community.cloudera.com/t5/forums/postpage/board-id/Questions”" target="_blank"&gt; starting a new thread&lt;/A&gt;. This will also be an opportunity to provide details specific to your environment that could aid others in assisting you with a more accurate answer to your question. You can link this thread as a reference in your new post.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 04:55:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/325774#M229715</guid>
      <dc:creator>VidyaSargur</dc:creator>
      <dc:date>2021-09-30T04:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to copy files from NiFi to HDFS</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/391274#M247545</link>
      <description>&lt;P&gt;it works!!!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 19:10:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-copy-files-from-NiFi-to-HDFS/m-p/391274#M247545</guid>
      <dc:creator>oraimundo</dc:creator>
      <dc:date>2024-08-01T19:10:23Z</dc:date>
    </item>
  </channel>
</rss>

