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

Wiktor Kubicki edited comment on NIFI-9989 at 9/7/22 12:51 PM:
---------------------------------------------------------------

[~exceptionfactory] thank you for your analys. I can disable Keep Alive in 
ListSFTP and it is probably good workaround. But I'm getting this error for 
FetchSFTP too, and there i can't disable Keep Alive because when i have it off, 
then:

{code:java}
FetchSFTP[id=0171108a-3596-188c-e3c6-0728aabc0bfd] Failed to close SFTPClient 
due to net.schmizz.sshj.connection.ConnectionException: Timeout expired: 
net.schmizz.sshj.connection.ConnectionException: Timeout expired - Caused by: 
java.util.concurrent.TimeoutException: Timeout expired 
{code}

This comes because our network killing not used connections - it is *not* nifi 
issue, but i need that option on.

I created seperated ticket for Send Alive support for ListSFTP (NIFI-10450). 
Can you created bug report in SSHJ? You are able to provide better tech 
description.
But.. it began in NiFi 1.16.1. The reason is sshj uprade or other changes in 
NiFi code? Maybe you can fix it here?




was (Author: kirhold):
[~exceptionfactory] thank you for your analys. I can disable Keep Alive in 
ListSFTP and it is probably good workaround. But I'm getting this error for 
FetchSFTP too, and there i can't disable Keep Alive because when i have it off, 
then:

{code:java}
FetchSFTP[id=0171108a-3596-188c-e3c6-0728aabc0bfd] Failed to close SFTPClient 
due to net.schmizz.sshj.connection.ConnectionException: Timeout expired: 
net.schmizz.sshj.connection.ConnectionException: Timeout expired - Caused by: 
java.util.concurrent.TimeoutException: Timeout expired 
{code}

This comes because our network killing not used connections - it is *not* nifi 
issue, but i need that option on.

I created seperated ticket for Send Alive support for LiveSFTP (NIFI-10450). 
Can you created bug report in SSHJ? You are able to provide better tech 
description.
But.. it began in NiFi 1.16.1. The reason is sshj uprade or other changes in 
NiFi code? Maybe you can fix it here?



> sftp processors Received SSH_MSG_UNIMPLEMENTED
> ----------------------------------------------
>
>                 Key: NIFI-9989
>                 URL: https://issues.apache.org/jira/browse/NIFI-9989
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.17.0, 1.16.1
>         Environment: Ubuntu 20.04, openjdk version "1.8.0_312"
> OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1~20.04-b07)
> OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)
>            Reporter: Jens M Kofoed
>            Assignee: David Handermann
>            Priority: Major
>         Attachments: image-2022-08-16-09-44-10-682.png
>
>
> After upgrading from single instance version 1.13.2 to a 3 node cluster 
> version 1.16.1 All sftp processors occasionally report errors:
> 2022-05-05 07:26:08,318 INFO [Timer-Driven Process Thread-7] 
> net.schmizz.sshj.transport.random.JCERandom Creating new SecureRandom.
> 2022-05-05 07:26:08,318 DEBUG [Timer-Driven Process Thread-7] 
> net.schmizz.sshj.transport.random.JCERandom Random creation took 0 ms
> 2022-05-05 07:26:08,318 DEBUG [Timer-Driven Process Thread-7] 
> net.schmizz.sshj.DefaultConfig Available cipher factories: 
> [chacha20-poly1...@openssh.com, aes128-cbc, aes128-ctr, aes192-cbc, 
> aes192-ctr, aes256-cbc, aes256-ctr, aes128-...@openssh.com, 
> aes256-...@openssh.com, blowfish-cbc, blowfish-ctr, cast128-cbc, cast128-ctr, 
> idea-cbc, idea-ctr, serpent128-cbc, serpent128-ctr, serpent192-cbc, 
> serpent192-ctr, serpent256-cbc, serpent256-ctr, 3des-cbc, 3des-ctr, 
> twofish128-cbc, twofish128-ctr, twofish192-cbc, twofish192-ctr, 
> twofish256-cbc, twofish256-ctr, twofish-cbc, arcfour, arcfour128, arcfour256]
> 2022-05-05 07:26:08,319 INFO [Timer-Driven Process Thread-7] 
> net.schmizz.sshj.transport.TransportImpl Client identity string: 
> SSH-2.0-SSHJ_0.33.0
> 2022-05-05 07:26:08,334 INFO [Timer-Driven Process Thread-7] 
> net.schmizz.sshj.transport.TransportImpl Server identity string: 
> SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.4
> 2022-05-05 07:26:08,339 DEBUG [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.transport.KeyExchanger Received SSH_MSG_KEXINIT
> 2022-05-05 07:26:08,340 DEBUG [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.transport.KeyExchanger Sending SSH_MSG_KEXINIT
> 2022-05-05 07:26:08,340 DEBUG [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.transport.KeyExchanger Negotiated algorithms: [ 
> kex=curve25519-sha256; sig=ssh-ed25519; 
> c2sCipher=chacha20-poly1...@openssh.com; 
> s2cCipher=chacha20-poly1...@openssh.com; c2sMAC=hmac-sha1; s2cMAC=hmac-sha1; 
> c2sComp=none; s2cComp=none;  ]
> 2022-05-05 07:26:08,340 DEBUG [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.transport.kex.Curve25519SHA256 Sending SSH_MSG_KEXDH_INIT
> 2022-05-05 07:26:08,349 DEBUG [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.transport.KeyExchanger Received kex followup data
> 2022-05-05 07:26:08,349 DEBUG [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.transport.kex.Curve25519SHA256 Received SSH_MSG_KEXDH_REPLY
> 2022-05-05 07:26:08,349 DEBUG [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.common.KeyType Key algo: ssh-ed25519, Key curve: 25519, Key 
> Len: 32p: [52, 76, 38, 101, -74, -101, -94, -14, 109, -121, -87, -122, -50, 
> -103, -88, -87, -50, -64, -55, 41, -109, -93, 60, 84, -75, -85, 59, -48, -34, 
> 25, -77, -53]
> 2022-05-05 07:26:08,351 DEBUG [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.transport.KeyExchanger Trying to verify host key with 
> net.schmizz.sshj.transport.verification.PromiscuousVerifier@45c3e734
> 2022-05-05 07:26:08,351 DEBUG [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.transport.KeyExchanger Sending SSH_MSG_NEWKEYS
> 2022-05-05 07:26:08,351 DEBUG [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.transport.KeyExchanger Received SSH_MSG_NEWKEYS
> 2022-05-05 07:26:08,351 DEBUG [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.transport.TransportImpl Received SSH_MSG_EXT_INFO
> 2022-05-05 07:26:08,354 DEBUG [Timer-Driven Process Thread-7] 
> net.schmizz.sshj.transport.KeyExchanger Sending SSH_MSG_KEXINIT
> 2022-05-05 07:26:08,355 DEBUG [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.transport.TransportImpl Received SSH_MSG_UNIMPLEMENTED #3
> 2022-05-05 07:26:08,355 ERROR [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.transport.TransportImpl Dying because - Received 
> SSH_MSG_UNIMPLEMENTED while exchanging keys
> net.schmizz.sshj.transport.TransportException: Received SSH_MSG_UNIMPLEMENTED 
> while exchanging keys
>         at 
> net.schmizz.sshj.transport.TransportImpl.gotUnimplemented(TransportImpl.java:565)
>         at 
> net.schmizz.sshj.transport.TransportImpl.handle(TransportImpl.java:495)
>         at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:113)
>         at net.schmizz.sshj.transport.Decoder.received(Decoder.java:200)
>         at net.schmizz.sshj.transport.Reader.run(Reader.java:60)
> 2022-05-05 07:26:08,355 INFO [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.transport.TransportImpl Disconnected - UNKNOWN
> 2022-05-05 07:26:08,355 DEBUG [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.transport.KeyExchanger Got notified of 
> net.schmizz.sshj.transport.TransportException: Received SSH_MSG_UNIMPLEMENTED 
> while exchanging keys
> 2022-05-05 07:26:08,355 DEBUG [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.transport.TransportImpl$NullService Notified of 
> net.schmizz.sshj.transport.TransportException: Received SSH_MSG_UNIMPLEMENTED 
> while exchanging keys
> 2022-05-05 07:26:08,355 DEBUG [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.transport.TransportImpl Setting active service to 
> null-service
> 2022-05-05 07:26:08,358 DEBUG [sshj-Reader-hostname/192.168.1.3:22] 
> net.schmizz.sshj.transport.Reader Stopping



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to