<?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: PutSFTP - Need help in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363257#M238949</link>
    <description>&lt;P&gt;Hi Matt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also have added the host to the known_host file as suggested in previous comment&lt;/P&gt;&lt;P&gt;have shared the details on error and configuration&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Feb 2023 20:08:00 GMT</pubDate>
    <dc:creator>hkh</dc:creator>
    <dc:date>2023-02-06T20:08:00Z</dc:date>
    <item>
      <title>PutSFTP - Need help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363170#M238928</link>
      <description>&lt;P&gt;&amp;nbsp;I am having a simple flow where I am fetching the creds for SFTP from DB and then uploading a file using the putSFTP but I am getting UnknownHostException error on PutSFTP processor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see the creds are being fetched - I see them in logs and also tried connecting to the Server using FileZilla (creds are correct ..no space etc all good with that)..&lt;/P&gt;&lt;P&gt;Also I tried hardcoding the creds in PutSFTP and still it did not work.&lt;/P&gt;&lt;P&gt;can someone please guide me..&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 13:55:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363170#M238928</guid>
      <dc:creator>hkh</dc:creator>
      <dc:date>2023-02-06T13:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: PutSFTP - Need help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363220#M238935</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/88051"&gt;@hkh&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;The NiFi service is owned by typically a service user.&amp;nbsp; All components (processors, controller services, etc) are execute their code as that NiFi service user.&amp;nbsp; So in the case of the putSFTP processor, that is the same.&lt;BR /&gt;&lt;BR /&gt;So let's assume your NiFi process is owned by local system user "nifi".&amp;nbsp; The putSFTP processor code is executed by the "nifi" user.&amp;nbsp; So "nifi" is executing a ssh command to connect to a remote SFTP server as another user (your provided creds).&amp;nbsp; Just as if you were executing this from command line on the host for the first time, the new SFTP server you are connecting to needs to be added to a known_hosts file for the "nifi" user.&amp;nbsp; &amp;nbsp;On command line, you would get a prompt to accept that new host.&amp;nbsp; Within the putSFTP processor there is no way to accept that.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So from the NiFi server host &lt;STRONG&gt;as the NiFi service user&lt;/STRONG&gt;, execute the ssh command to connect to the target SFTP server you are trying to interface with.&amp;nbsp; When prompted to accept the add the new host to your known_hosts.&amp;nbsp; Now go back to your dataflow in NiFi and try running the putSFTP processor again as see if you still encounter the same exception.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If this does not solve the issue, can you share your putSFYP processor configuration and the complete error message from the nifi-app.log?&lt;BR /&gt;&lt;BR /&gt;You may also want to try putting the below putSFTP processor class in DEBUG in the NiFi logback.xml to see if any DEBUG output helps determine the issue.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;org.apache.nifi.processors.standard.PutSFTP&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic"&gt;If you found that the provided solution(s) assisted you with your query, please take a moment to login and click&lt;/FONT&gt;&amp;nbsp;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;Accept as Solution&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;below each response that helped.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;Matt&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 15:27:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363220#M238935</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-02-06T15:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: PutSFTP - Need help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363252#M238947</link>
      <description>&lt;P&gt;Please see below comments..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 20:08:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363252#M238947</guid>
      <dc:creator>hkh</dc:creator>
      <dc:date>2023-02-06T20:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: PutSFTP - Need help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363256#M238948</link>
      <description>&lt;P&gt;o.a.nifi.processors.standard.PutSFTP PutSFTP[id=e46aac15-0185-1000-0243-066468b818f4] Unable to transfer StandardFlowFileRecord[uuid=3a9e192c-7f34-48de-ace9-c144ac41e9d9,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1674478122732-215, container=default, section=215], offset=13832, length=62],offset=0,name=test.hl7,size=62] to remote host myhostname://test.net due to org.apache.nifi.processor.exception.ProcessException: IOException thrown from PutSFTP[id=e46aac15-0185-1000-0243-066468b818f4]: java.io.IOException: Failed to obtain connection to remote host due to com.jcraft.jsch.JSchException: java.net.UnknownHostException: myhostname://test.net: java.io.IOException: Failed to obtain connection to remote host due to com.jcraft.jsch.JSchException: java.net.UnknownHostException: myhostname://test.net; routing to failure: java.io.IOException: Failed to obtain connection to remote host due to com.jcraft.jsch.JSchException: java.net.UnknownHostException: myhostname://test.net&lt;BR /&gt;java.io.IOException: Failed to obtain connection to remote host due to com.jcraft.jsch.JSchException: java.net.UnknownHostException: myhostname://test.net&lt;BR /&gt;at org.apache.nifi.processors.standard.util.SFTPTransfer.getChannel(SFTPTransfer.java:515)&lt;BR /&gt;at org.apache.nifi.processors.standard.util.SFTPTransfer.put(SFTPTransfer.java:597)&lt;BR /&gt;at org.apache.nifi.processors.standard.PutFileTransfer$1.process(PutFileTransfer.java:130)&lt;BR /&gt;at org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2212)&lt;BR /&gt;at org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2180)&lt;BR /&gt;at org.apache.nifi.processors.standard.PutFileTransfer.onTrigger(PutFileTransfer.java:122)&lt;BR /&gt;at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)&lt;BR /&gt;at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1162)&lt;BR /&gt;at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:209)&lt;BR /&gt;at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)&lt;BR /&gt;at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)&lt;BR /&gt;at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)&lt;BR /&gt;at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)&lt;BR /&gt;at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)&lt;BR /&gt;at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)&lt;BR /&gt;at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)&lt;BR /&gt;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)&lt;BR /&gt;at java.lang.Thread.run(Thread.java:748)&lt;BR /&gt;Caused by: com.jcraft.jsch.JSchException: java.net.UnknownHostException: myhostname://test.net&lt;BR /&gt;at com.jcraft.jsch.Util.createSocket(Util.java:394)&lt;BR /&gt;at com.jcraft.jsch.Session.connect(Session.java:215)&lt;BR /&gt;at com.jcraft.jsch.Session.connect(Session.java:183)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hkh_0-1675713931708.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/36735iE6557E7B3AF69B9A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hkh_0-1675713931708.png" alt="hkh_0-1675713931708.png" /&gt;&lt;/span&gt;&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="hkh_1-1675713991564.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/36736i94E076C3C89FA4D6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hkh_1-1675713991564.png" alt="hkh_1-1675713991564.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;at org.apache.nifi.processors.standard.util.SFTPTransfer.getChannel(SFTPTransfer.java:495)&lt;BR /&gt;... 17 common frames omitted&lt;BR /&gt;Caused by: java.net.UnknownHostException: myhostname://test.net&lt;BR /&gt;at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)&lt;BR /&gt;at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)&lt;BR /&gt;at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)&lt;BR /&gt;at java.net.Socket.connect(Socket.java:589)&lt;BR /&gt;at java.net.Socket.connect(Socket.java:538)&lt;BR /&gt;at java.net.Socket.&amp;lt;init&amp;gt;(Socket.java:434)&lt;BR /&gt;at java.net.Socket.&amp;lt;init&amp;gt;(Socket.java:211)&lt;BR /&gt;at com.jcraft.jsch.Util$1.run(Util.java:362)&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 20:06:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363256#M238948</guid>
      <dc:creator>hkh</dc:creator>
      <dc:date>2023-02-06T20:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: PutSFTP - Need help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363257#M238949</link>
      <description>&lt;P&gt;Hi Matt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also have added the host to the known_host file as suggested in previous comment&lt;/P&gt;&lt;P&gt;have shared the details on error and configuration&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 20:08:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363257#M238949</guid>
      <dc:creator>hkh</dc:creator>
      <dc:date>2023-02-06T20:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: PutSFTP - Need help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363258#M238950</link>
      <description>&lt;P&gt;For security reasons I have changes the hostname and also shared screenshot without disclosing any sensitive details.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 20:09:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363258#M238950</guid>
      <dc:creator>hkh</dc:creator>
      <dc:date>2023-02-06T20:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: PutSFTP - Need help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363348#M238963</link>
      <description>&lt;P&gt;Is there any alternative to putSFTP?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 19:38:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363348#M238963</guid>
      <dc:creator>hkh</dc:creator>
      <dc:date>2023-02-07T19:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: PutSFTP - Need help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363425#M238982</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/88051"&gt;@hkh&lt;/a&gt;&amp;nbsp;I see that you have changed the hostname for security reasons, but I am confused by the "://" in your hostname.&amp;nbsp; Is that present in the real hostname?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 18:02:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363425#M238982</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-02-08T18:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: PutSFTP - Need help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363428#M238983</link>
      <description>&lt;P&gt;yes it is&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 19:38:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363428#M238983</guid>
      <dc:creator>hkh</dc:creator>
      <dc:date>2023-02-08T19:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: PutSFTP - Need help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363543#M239015</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/88051"&gt;@hkh&lt;/a&gt;&amp;nbsp;Based on RFC1123, the use of ": or /" in a hostname is not valid.&lt;BR /&gt;&lt;A href="https://www.rfc-editor.org/rfc/rfc1123" target="_blank"&gt;https://www.rfc-editor.org/rfc/rfc1123&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;From command line on the server where NiFi is running as the user who owns the NiFi running process, can you "ssh &amp;lt;username&amp;gt;@&lt;SPAN&gt;myhostname://test.net" successfully?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;So I am still a bit confused on you having an SFTP-server running on a server with a hostname containing these characters.&amp;nbsp; It may very well be that these invalid characters re resulting in the unknownHostException coming out of the Java SSH library used by the NiFi putSFTP processor.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;As far as an alternative to putSFTP, that would require knowing more about your endpoint you are trying to write to in order to provide such suggestions.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 20:59:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363543#M239015</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-02-09T20:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: PutSFTP - Need help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363548#M239017</link>
      <description>&lt;P&gt;Hi Matt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes your suggestion worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you so much ..&lt;/P&gt;&lt;P&gt;Great catch ..issue was in the hostname as you shared in the resource..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 22:33:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363548#M239017</guid>
      <dc:creator>hkh</dc:creator>
      <dc:date>2023-02-09T22:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: PutSFTP - Need help</title>
      <link>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363549#M239018</link>
      <description>&lt;P&gt;Thank you Matt &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 22:34:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/PutSFTP-Need-help/m-p/363549#M239018</guid>
      <dc:creator>hkh</dc:creator>
      <dc:date>2023-02-09T22:34:09Z</dc:date>
    </item>
  </channel>
</rss>

