hierynomus / hierynomus/sshj

SSHJ disconnect exception

Open
#885 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.7k
Forks
620
Avg merge
3d 23h
Merged PRs (30d)
11

Description

`[reader] INFO net.schmizz.sshj.transport.TransportImpl - Received SSH_MSG_DISCONNECT (reason=BY_APPLICATION, msg=User Disconnected)
[reader] ERROR net.schmizz.sshj.transport.TransportImpl - Dying because - User Disconnected
net.schmizz.sshj.transport.TransportException: [BY_APPLICATION] User Disconnected
at net.schmizz.sshj.transport.TransportImpl.gotDisconnect(TransportImpl.java:565)
at net.schmizz.sshj.transport.TransportImpl.handle(TransportImpl.java:521)
at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:113)
at net.schmizz.sshj.transport.Decoder.received(Decoder.java:203)
at net.schmizz.sshj.transport.Reader.run(Reader.java:60)
[reader] INFO net.schmizz.sshj.transport.TransportImpl - Disconnected - BY_APPLICATION
[main] ERROR net.schmizz.concurrent.Promise - <> woke to: net.schmizz.sshj.connection.ConnectionException: User Disconnected
Caused by: net.schmizz.sshj.connection.ConnectionException: User Disconnected
at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:32)
at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:26)
at net.schmizz.concurrent.Promise.deliverError(Promise.java:95)
at net.schmizz.concurrent.Event.deliverError(Event.java:74)
at net.schmizz.concurrent.ErrorDeliveryUtil.alertEvents(ErrorDeliveryUtil.java:34)
at net.schmizz.sshj.connection.channel.AbstractChannel.notifyError(AbstractChannel.java:239)
at net.schmizz.sshj.connection.channel.direct.SessionChannel.notifyError(SessionChannel.java:229)
at net.schmizz.sshj.common.ErrorNotifiable$Util.alertAll(ErrorNotifiable.java:35)
at net.schmizz.sshj.connection.ConnectionImpl.notifyError(ConnectionImpl.java:261)
at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:620)
at net.schmizz.sshj.transport.Reader.run(Reader.java:66)
Caused by: net.schmizz.sshj.transport.TransportException: [BY_APPLICATION] User Disconnected
at net.schmizz.sshj.transport.TransportImpl.gotDisconnect(TransportImpl.java:565)
at net.schmizz.sshj.transport.TransportImpl.handle(TransportImpl.java:521)
at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:113)
at net.schmizz.sshj.transport.Decoder.received(Decoder.java:203)
at net.schmizz.sshj.transport.Reader.run(Reader.java:60)`

MFT-14336/IT43709 - sshj SFTP client's sessions not getting clean disconnect after SSP upgrade
When the client is closing the sftp channel, SSP was closing everything
on its side . It was disconnecting the ssh connection before closing the
channel.
Resolution: Changed the order on SSP side to close the sftp channel and
then disconnect the ssh connection. Still this jssh sample client is
throwing stacktrace. Created a system property "sftp.channel.disconnect",
when set to false, will bypass this disconnect (the default value is true).
With this change the sshj client is terminates the connection correctly.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.