<?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: Why does my NiFi ListenFTP in Docker container close connections from the host machine? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Why-does-my-NiFi-ListenFTP-in-Docker-container-close/m-p/390512#M247284</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/111636"&gt;@nbo&lt;/a&gt;&amp;nbsp;Welcome to the Cloudera Community!&lt;BR /&gt;&lt;BR /&gt;To help you get the best possible solution, I have tagged our NiFi experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp; who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated on your post, and we hope you find a satisfactory solution to your query.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jul 2024 17:08:49 GMT</pubDate>
    <dc:creator>DianaTorres</dc:creator>
    <dc:date>2024-07-17T17:08:49Z</dc:date>
    <item>
      <title>Why does my NiFi ListenFTP in Docker container close connections from the host machine?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Why-does-my-NiFi-ListenFTP-in-Docker-container-close/m-p/390502#M247275</link>
      <description>&lt;P&gt;I am experiencing an issue with FTP access from the host machine to a Docker container. FTP access works when I try directly from within the container. I am unsure where the problem lies.&lt;/P&gt;&lt;H1&gt;Context:&lt;/H1&gt;&lt;P&gt;I am using Apache NiFi 2.0-M2 deployed in a Docker container. I have configured a ListenFTP processor in NiFi to receive files via FTP on port 2221 and make them accessible from the host machine.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nbo_0-1721222536715.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/41184iD5EB4B5E01EC8AC4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nbo_0-1721222536715.png" alt="nbo_0-1721222536715.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H1&gt;docker-compose.yml&lt;/H1&gt;&lt;P&gt;Here is my docker-compose.yml configuration:&lt;/P&gt;&lt;PRE&gt;services:
nifi:
container_name: nifi
image: apache/nifi:2.0.0-M2
ports:
  "8443:8443"
  "2221:2221" # ftp
environment:
  NIFI_WEB_HTTPS_PORT=8443&lt;/PRE&gt;&lt;P&gt;The port 2221 seems to be correctly mapped from the container to the host machine.&lt;/P&gt;&lt;H1&gt;Connection Tests from the Host Machine:&lt;/H1&gt;&lt;H2&gt;Telnet:&lt;/H2&gt;&lt;P&gt;telnet localhost 2221&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Trying ::1... Connected to localhost. Escape character is '^]'. Connection closed by foreign host.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;H2&gt;Netcat:&lt;/H2&gt;&lt;P&gt;nc -zv localhost 2221&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Connection to localhost port 2221 [tcp/rockwell-csp1] succeeded!&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;H2&gt;Curl:&lt;/H2&gt;&lt;P&gt;curl -4 -v -u nbo:******* -T test2.txt ``&lt;A href="ftp://localhost:2221" target="_blank" rel="noopener"&gt;ftp://localhost:2221&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;* Host localhost:2221 was resolved.

* IPv6: ::1
* IPv4: 127.0.0.1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\*   Trying 127.0.0.1:2221...
* Connected to localhost (127.0.0.1) port 2221
* response reading failed (errno: 36)
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Closing connection
  curl: (56) response reading failed (errno: 36)&lt;/PRE&gt;&lt;H2&gt;FTP:&lt;/H2&gt;&lt;P&gt;ftp localhost 2221&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Connected to localhost. 421 Service not available, remote server has closed connection&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;H1&gt;Summary:&lt;/H1&gt;&lt;P&gt;Despite the configurations and resolution attempts mentioned above, the FTP connection consistently fails from the host machine with errors indicating that the server closes the connection immediately. The tests show that the port is accessible, but the NiFi ListenFTP server does not seem to accept or properly handle FTP connections from outside the container.&lt;/P&gt;&lt;P&gt;Many thanks in advance for your help.&lt;/P&gt;&lt;P&gt;Nicolas&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 13:23:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Why-does-my-NiFi-ListenFTP-in-Docker-container-close/m-p/390502#M247275</guid>
      <dc:creator>nbo</dc:creator>
      <dc:date>2024-07-17T13:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my NiFi ListenFTP in Docker container close connections from the host machine?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Why-does-my-NiFi-ListenFTP-in-Docker-container-close/m-p/390512#M247284</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/111636"&gt;@nbo&lt;/a&gt;&amp;nbsp;Welcome to the Cloudera Community!&lt;BR /&gt;&lt;BR /&gt;To help you get the best possible solution, I have tagged our NiFi experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp; who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated on your post, and we hope you find a satisfactory solution to your query.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 17:08:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Why-does-my-NiFi-ListenFTP-in-Docker-container-close/m-p/390512#M247284</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2024-07-17T17:08:49Z</dc:date>
    </item>
  </channel>
</rss>

