NIFI PutSFTP Auth Fail

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

NIFI PutSFTP Auth Fail

fitterweb
I'm using putSFTP to transfer files from one server to another in an AWS stack.

I'm able to connect from one server to the other at the command line using sftp and specifying the host key(?) which is the public key I normally use to connect to the server.

I have tried a number of different combinations of settings in the putSFTP processor but I continue to get the error that auth failed.

Since I'm able to connect from the command line I know that I'm using the right key and that the server can reach the other server. So I'm at a loss. Not sure how to debug this? Any help greatly appreciated.

I have set the following configurations to match the information I use when I use sftp directly. :

Host=hostname of server
Port=22
Username= username for login
Host key file= path and filename for the public key used

This is a copy of the error I receive:



2017-03-23 17:15:54,562 ERROR [Timer-Driven Process Thread-8] o.a.nifi.processors.standard.PutSFTP PutSFTP[id=fafae53e-015a-1000-03e0-f5f2bb961c95] Unable to transfer StandardFlowFileRecord[uuid=64c62269-a16e-4c67-9901-7fc5dd003355,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1490289354501-146, container=default, section=146], offset=0, length=2934225],offset=0,name=<asset name here>,size=2934225] to remote host <host goes here> due to java.io.IOException: Failed to obtain connection to remote host due to com.jcraft.jsch.JSchException: Auth fail: java.io.IOException: Failed to obtain connection to remote host due to com.jcraft.jsch.JSchException: Auth fail
2017-03-23 17:15:54,562 ERROR [Timer-Driven Process Thread-8] o.a.nifi.processors.standard.PutSFTP
java.io.IOException: Failed to obtain connection to remote host due to com.jcraft.jsch.JSchException: Auth fail
        at org.apache.nifi.processors.standard.util.SFTPTransfer.getChannel(SFTPTransfer.java:447) ~[nifi-standard-processors-1.1.0.jar:1.1.0]
        at org.apache.nifi.processors.standard.util.SFTPTransfer.getRemoteFileInfo(SFTPTransfer.java:491) ~[nifi-standard-processors-1.1.0.jar:1.1.0]
Reply | Threaded
Open this post in threaded view
|

Re: NIFI PutSFTP Auth Fail

Andy LoPresto-2
Sorry to hear you are having trouble with this. 

Silly debugging questions:

* The key you are using in both scenarios is the same, correct? You don’t have both an RSA and DSA key with only one added to authorized_keys on the remote endpoint?
* The authorized_keys is not corrupt. Someone has reported being able to SSH with the key but not use JSch [1] (the underlying library making the connection here). Can you try re-copying the public key to the authorized_keys file?
* If neither of those work, you can enable more detailed logging for the component by adding a line in $NIFI_HOME/conf/logback.xml for "com.jcraft.jsch=DEBUG” and waiting 30 seconds for NiFi to pick up the changes. 



Andy LoPresto
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

On Mar 23, 2017, at 10:37 AM, fitterweb <[hidden email]> wrote:

I'm using putSFTP to transfer files from one server to another in an AWS
stack.

I'm able to connect from one server to the other at the command line using
sftp and specifying the host key(?) which is the public key I normally use
to connect to the server.

I have tried a number of different combinations of settings in the putSFTP
processor but I continue to get the error that auth failed.

Since I'm able to connect from the command line I know that I'm using the
right key and that the server can reach the other server. So I'm at a loss.
Not sure how to debug this? Any help greatly appreciated.

I have set the following configurations to match the information I use when
I use sftp directly. :

Host=hostname of server
Port=22
Username= username for login
Host key file= path and filename for the public key used

This is a copy of the error I receive:



2017-03-23 17:15:54,562 ERROR [Timer-Driven Process Thread-8]
o.a.nifi.processors.standard.PutSFTP
PutSFTP[id=fafae53e-015a-1000-03e0-f5f2bb961c95] Unable to transfer
StandardFlowFileRecord[uuid=64c62269-a16e-4c67-9901-7fc5dd003355,claim=StandardContentClaim
[resourceClaim=StandardResourceClaim[id=1490289354501-146,
container=default, section=146], offset=0,
length=2934225],offset=0,name=<asset name here>,size=2934225] to remote host
<host goes here> due to java.io.IOException: Failed to obtain connection to
remote host due to com.jcraft.jsch.JSchException: Auth fail:
java.io.IOException: Failed to obtain connection to remote host due to
com.jcraft.jsch.JSchException: Auth fail
2017-03-23 17:15:54,562 ERROR [Timer-Driven Process Thread-8]
o.a.nifi.processors.standard.PutSFTP
java.io.IOException: Failed to obtain connection to remote host due to
com.jcraft.jsch.JSchException: Auth fail
at
org.apache.nifi.processors.standard.util.SFTPTransfer.getChannel(SFTPTransfer.java:447)
~[nifi-standard-processors-1.1.0.jar:1.1.0]
at
org.apache.nifi.processors.standard.util.SFTPTransfer.getRemoteFileInfo(SFTPTransfer.java:491)
~[nifi-standard-processors-1.1.0.jar:1.1.0]




--
View this message in context: http://apache-nifi-developer-list.39713.n7.nabble.com/NIFI-PutSFTP-Auth-Fail-tp15236.html
Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.


signature.asc (859 bytes) Download Attachment