[ 
https://issues.apache.org/jira/browse/NIFI-7243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17101131#comment-17101131
 ] 

Nathan Gough commented on NIFI-7243:
------------------------------------

Thanks [~raulpopi].

I'm not yet able to completely reproduce your issue. At the moment when I use 
an ed25519 key, I received the same error you were seeing but only because I 
had not added the key to authorized_users on the server side. Once I did that, 
I was able to use the SFTP processors successfully. 

Are you able to provide more logs from NiFi? You can add these sections to 
nifi/conf/logback.xml:

 
{code:java}
<appender name="SSHJ_FILE" 
class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${org.apache.nifi.bootstrap.config.log.dir}/sshj-debug.log</file>
        <rollingPolicy 
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <!--
              For daily rollover, use 'user_%d.log'.
              For hourly rollover, use 'user_%d{yyyy-MM-dd_HH}.log'.
              To GZIP rolled files, replace '.log' with '.log.gz'.
              To ZIP rolled files, replace '.log' with '.log.zip'.
            -->
            
<fileNamePattern>${org.apache.nifi.bootstrap.config.log.dir}/sshj-debug_%d.log</fileNamePattern>
            <!-- keep 5 log files worth of history -->
            <maxHistory>5</maxHistory>
        </rollingPolicy>
        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
            <pattern>%date %level [%thread] %logger{40} %msg%n</pattern>
        </encoder>
</appender>{code}
{code:java}
<logger name="net.schmizz.sshj" level="TRACE" additivity="false">
    <appender-ref ref="SSHJ_FILE"/>
</logger>{code}
If possible, checking the logs on the server side could help too.

 

> SFTP Processors - Exhausted available authentication methods
> ------------------------------------------------------------
>
>                 Key: NIFI-7243
>                 URL: https://issues.apache.org/jira/browse/NIFI-7243
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.10.0, 1.11.0, 1.11.1, 1.11.3
>         Environment: PRO
>            Reporter: Raúl
>            Assignee: Nathan Gough
>            Priority: Critical
>              Labels: SFTP, listsftp
>
> In version 1.8 this works correctly. In superiors no.
>  
> Any of the processors: ListSFTP, FetchSFTP, GetSFTP, PutSFTP when connecting 
> to an sftp shows the error:
> 2020-03-10 15:12:51,596 ERROR [Timer-Driven Process Thread-3] 
> o.a.nifi.processors.standard.ListSFTP 
> ListSFTP[id=af72555e-0170-1000-c80d-7e992c9de544] Failed to perform listing 
> on remote host due to Exhausted available authentication methods: 
> net.schmizz.sshj.userauth.UserAuthException: Exhausted available 
> authentication methods
> net.schmizz.sshj.userauth.UserAuthException: Exhausted available 
> authentication methods
>  at net.schmizz.sshj.SSHClient.auth(SSHClient.java:230)
>  
> These tests that I commented have been made from nifi, both in windows and 
> linux environment and fails in both.
>    1 - Strict Host Key Checking: false
>    2 - Strict Host Key Checking: true
>         Host Key File: C:\Users\usuario\.ssh\known_hosts --> (ssh-rsa, 
> ssh-dss and ecdsa-sha2-nistp256)
>  
> From the machines, both in windows and in linux, if an sftp is made from the 
> command line it connects without problems. But with Nifi he fails to connect.
>  
> Any idea about how can I resolve this error? 
>  
> Thank you in advance,
> -------------------------------------------- log 
> -------------------------------------------------
> 2020-03-10 15:12:51,596 ERROR [Timer-Driven Process Thread-3] 
> o.a.nifi.processors.standard.ListSFTP 
> ListSFTP[id=af72555e-0170-1000-c80d-7e992c9de544] Failed to perform listing 
> on remote host due to Exhausted available authentication methods: 
> net.schmizz.sshj.userauth.UserAuthException: Exhausted available 
> authentication methods2020-03-10 15:12:51,596 ERROR [Timer-Driven Process 
> Thread-3] o.a.nifi.processors.standard.ListSFTP 
> ListSFTP[id=af72555e-0170-1000-c80d-7e992c9de544] Failed to perform listing 
> on remote host due to Exhausted available authentication methods: 
> net.schmizz.sshj.userauth.UserAuthException: Exhausted available 
> authentication methodsnet.schmizz.sshj.userauth.UserAuthException: Exhausted 
> available authentication methods at 
> net.schmizz.sshj.SSHClient.auth(SSHClient.java:230) at 
> org.apache.nifi.processors.standard.util.SFTPTransfer.getSFTPClient(SFTPTransfer.java:606)
>  at 
> org.apache.nifi.processors.standard.util.SFTPTransfer.getListing(SFTPTransfer.java:233)
>  at 
> org.apache.nifi.processors.standard.util.SFTPTransfer.getListing(SFTPTransfer.java:196)
>  at 
> org.apache.nifi.processors.standard.ListFileTransfer.performListing(ListFileTransfer.java:106)
>  at 
> org.apache.nifi.processors.standard.ListSFTP.performListing(ListSFTP.java:146)
>  at 
> org.apache.nifi.processor.util.list.AbstractListProcessor.listByTrackingTimestamps(AbstractListProcessor.java:472)
>  at 
> org.apache.nifi.processor.util.list.AbstractListProcessor.onTrigger(AbstractListProcessor.java:414)
>  at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>  at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1176)
>  at 
> org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:213)
>  at 
> org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
>  at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110) at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at 
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>  at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  at java.lang.Thread.run(Thread.java:748)2020-03-10 15:12:51,601 DEBUG 
> [Timer-Driven Process Thread-3] o.a.nifi.processors.standard.ListSFTP 
> ListSFTP[id=af72555e-0170-1000-c80d-7e992c9de544] has chosen to yield its 
> resources; will not be scheduled to run again for 1000 milliseconds2020-03-10 
> 15:12:51,603 TRACE [Timer-Driven Process Thread-3] 
> o.a.n.c.r.StandardProcessSession StandardProcessSession[id=0] checkpointed, 
> but no events were performed by this ProcessSession



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to