Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Using ListSFTP results in an exception: Failed to obtain connection to remote host due to com.jcraft.jsch.JSCHException: Session.connect: java.net.SocketException: Connection reset: {}

avatar
Contributor

Using ListSFTP processor in Nifi 1.3.0 to list contents of a SFTP directory. Getting exception message:

Failed to obtain connection to remote host due to com.jcraft.jsch.JSCHException: Session.connect: java.net.SocketException: Connection reset: {}

Here's a screenshot from the nifi-app.log on the NIFI Node

43831-screen-shot-2017-12-05-at-50541-pm.png

1 ACCEPTED SOLUTION

avatar
Super Collaborator

Hi @Mayan Nath,

Can you please ensure to set "Strict Host Key Checking to False "

and also remove the known_hosts entries for the target host (under the directory ~/.ssh/knon_hosts or nifi user)

the best thing is to do the sftp manually from the command line and test once thats working incorporate to the NiFi cluster.( please ensure that you have performed the same across all he hosts)

Hope this helps !!

View solution in original post

4 REPLIES 4

avatar
Super Collaborator

Hi @Mayan Nath,

Can you please ensure to set "Strict Host Key Checking to False "

and also remove the known_hosts entries for the target host (under the directory ~/.ssh/knon_hosts or nifi user)

the best thing is to do the sftp manually from the command line and test once thats working incorporate to the NiFi cluster.( please ensure that you have performed the same across all he hosts)

Hope this helps !!

avatar
Contributor

Thanks @bkosaraju

Strict Host Key Checking is set to False.

If with target hosts, you mean, the SFTP server (our destination) then it is not in the list of /.ssh/known_hosts)

Just tried manual SFTP again and this time received, Connection Reset by Peer. Checking SFTP side in case our Node IP is blacklisted (possibly due to Max Failure condition.)
Update -- 12-07-2017 -- The IP for the NIFI Node was blacklisted on the SFTP Side. We've whitelisted the IP and the processor is now functional. Thanks.

avatar
Master Guru

Did OpenSSL version change at server?

https://superuser.com/questions/972996/create-a-sftp-connection-in-netbeans

Did directory permissions change on FTP server? Try a different directory.

Did NiFi user change?

Increase timeout

Definitely try command line sftp from a nifi node.

Did any IPs change?

https://access.redhat.com/solutions/2071143

avatar
Contributor

Thanks @Timothy Spann

This is a new user but also the existing users are not working to reach the SFTP to any location.

Directory permissions on SFTP have not changed.

Timeout is currently set to 30sec on the processor. That should be sufficient but please advise if that needs to be increased.

IPs have not changed.

RE - command line SFTP -- Just tried manual SFTP again and this time received, Connection Reset by Peer. Checking SFTP side in case our Node IP is blacklisted (possibly due to Max Failure condition.)

Update -- 12-07-2017 -- The IP for the NIFI Node was blacklisted on the SFTP Side. We've whitelisted the IP and the processor is now functional. Thanks.