gencywinter opened a new issue, #791: URL: https://github.com/apache/mina-sshd/issues/791
### Description When Nio2Session writes data through handleWriteCycleFailure, a java.io.IOException: Broken pipe occurs. Immediately following this, a series of Close actions are initiated. However, at this point, the data in the Channel has not yet been fully read. It is hoped that through some customized consumer methods or by providing convenient extension capabilities, external entities can continue to accept data. ### Motivation In certain scenarios, Channels or Networks may be unstable. When Broken pipe occurs, it actually means that the data has already been transmitted. By providing this extended capability, if it can be ensured that the data is definitely secure, it can further guarantee the stability of data acquisition through the SSH protocol. ### Alternatives considered Find No Solution ### Additional context In one problem, log as follows: 1, Broken pipe occurs: 2, Then All Object Close done; 3, Packet read By DefaultUnknownChannelReferenceHandler 4, Then Thread sshd-SshClient[2e89bfdc]-nio2-thread Close. Result: After 2, the Packet In 3 Loss. Log No.1 : 2025-06-02 23:41:43.149+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.logging.LoggingUtils 576] handleWriteCycleFailure(Nio2Session[local=/x.x.x.x:x, remote=/x.x.x.x:x]) failed (IOException) to write 64 bytes at write cycle=91 after 457930 nanos: Broken pipe java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcherImpl.write0(Native Method) at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) at sun.nio.ch.IOUtil.write(IOUtil.java:65) at sun.nio.ch.UnixAsynchronousSocketChannelImpl.implWrite(UnixAsynchronousSocketChannelImpl.java:694) at sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:383) at sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:400) at org.apache.sshd.common.io.nio2.Nio2Session.doWriteCycle(Nio2Session.java:535) at org.apache.sshd.common.io.nio2.Nio2Session.startWriting(Nio2Session.java:516) at org.apache.sshd.common.io.nio2.Nio2Session.writeBuffer(Nio2Session.java:191) at org.apache.sshd.common.session.helpers.AbstractSession.doWritePacket(AbstractSession.java:1166) at org.apache.sshd.common.session.helpers.KeyExchangeMessageHandler.writeOrEnqueue(KeyExchangeMessageHandler.java:306) at org.apache.sshd.common.session.helpers.KeyExchangeMessageHandler.writePacket(KeyExchangeMessageHandler.java:246) at org.apache.sshd.common.session.helpers.AbstractSession.writePacket(AbstractSession.java:1078) at org.apache.sshd.common.channel.AbstractChannel.writePacket(AbstractChannel.java:819) at org.apache.sshd.common.channel.AbstractChannel.sendWindowAdjust(AbstractChannel.java:1100) at org.apache.sshd.common.channel.LocalWindow.release(LocalWindow.java:134) at org.apache.sshd.client.channel.AbstractClientChannel.doWriteData(AbstractClientChannel.java:447) at org.apache.sshd.common.channel.AbstractChannel.handleData(AbstractChannel.java:846) at org.apache.sshd.common.session.helpers.AbstractConnectionService.channelData(AbstractConnectionService.java:585) at org.apache.sshd.common.session.helpers.AbstractConnectionService.process(AbstractConnectionService.java:466) at org.apache.sshd.common.session.helpers.CurrentService.process(CurrentService.java:109) at org.apache.sshd.common.session.helpers.AbstractSession.doHandleMessage(AbstractSession.java:636) at org.apache.sshd.common.session.helpers.AbstractSession.lambda$handleMessage$0(AbstractSession.java:557) at org.apache.sshd.common.util.threads.ThreadUtils.runAsInternal(ThreadUtils.java:68) at org.apache.sshd.common.session.helpers.AbstractSession.handleMessage(AbstractSession.java:556) at org.apache.sshd.common.session.helpers.AbstractSession.decode(AbstractSession.java:1731) at org.apache.sshd.common.session.helpers.AbstractSession.messageReceived(AbstractSession.java:517) at org.apache.sshd.common.session.helpers.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:64) at org.apache.sshd.common.io.nio2.Nio2Session.handleReadCycleCompletion(Nio2Session.java:409) at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:382) at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:377) at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.lambda$completed$0(Nio2CompletionHandler.java:38) at java.security.AccessController.doPrivileged(Native Method) at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:37) at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126) at sun.nio.ch.Invoker.invokeDirect(Invoker.java:157) at sun.nio.ch.UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:555) at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:277) at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:298) at org.apache.sshd.common.io.nio2.Nio2Session.doReadCycle(Nio2Session.java:494) at org.apache.sshd.common.io.nio2.Nio2Session.handleReadCycleCompletion(Nio2Session.java:411) at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:382) at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:377) at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.lambda$completed$0(Nio2CompletionHandler.java:38) at java.security.AccessController.doPrivileged(Native Method) at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:37) at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126) at sun.nio.ch.Invoker.invokeDirect(Invoker.java:157) at sun.nio.ch.UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:555) at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:277) at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:298) at org.apache.sshd.common.io.nio2.Nio2Session.doReadCycle(Nio2Session.java:494) at org.apache.sshd.common.io.nio2.Nio2Session.handleReadCycleCompletion(Nio2Session.java:411) at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:382) at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:377) at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.lambda$completed$0(Nio2CompletionHandler.java:38) at java.security.AccessController.doPrivileged(Native Method) at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:37) at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126) at sun.nio.ch.Invoker.invokeDirect(Invoker.java:157) at sun.nio.ch.UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:555) at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:277) at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:298) at org.apache.sshd.common.io.nio2.Nio2Session.doReadCycle(Nio2Session.java:494) at org.apache.sshd.common.io.nio2.Nio2Session.handleReadCycleCompletion(Nio2Session.java:411) at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:382) at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:377) at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.lambda$completed$0(Nio2CompletionHandler.java:38) at java.security.AccessController.doPrivileged(Native Method) at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:37) at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126) at sun.nio.ch.Invoker.invokeDirect(Invoker.java:157) at sun.nio.ch.UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:555) at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:277) at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:298) at org.apache.sshd.common.io.nio2.Nio2Session.doReadCycle(Nio2Session.java:494) at org.apache.sshd.common.io.nio2.Nio2Session.handleReadCycleCompletion(Nio2Session.java:411) at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:382) at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:377) at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.lambda$completed$0(Nio2CompletionHandler.java:38) at java.security.AccessController.doPrivileged(Native Method) at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:37) at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126) at sun.nio.ch.Invoker.invokeDirect(Invoker.java:157) at sun.nio.ch.UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:555) at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:277) at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:298) at org.apache.sshd.common.io.nio2.Nio2Session.doReadCycle(Nio2Session.java:494) at org.apache.sshd.common.io.nio2.Nio2Session.handleReadCycleCompletion(Nio2Session.java:411) at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:382) at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:377) at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.lambda$completed$0(Nio2CompletionHandler.java:38) at java.security.AccessController.doPrivileged(Native Method) at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:37) at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126) at sun.nio.ch.Invoker$2.run(Invoker.java:218) at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112) 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:750) Log No. 2: Close 2025-06-02 23:41:43.162+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.session.helpers.SessionTimeoutListener 71] sessionClosed(ClientSessionImpl[x@/x.x.x.x:x]) un-tracked 2025-06-02 23:41:43.162+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.AbstractCloseable 92] close(ClientSessionImpl[x@/x.x.x.x:x]) Closing immediately 2025-06-02 23:41:43.162+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.client.session.ClientSessionImpl 200] signalAuthFailure(ClientSessionImpl[x@/x.x.x.x:x]) type=SshException, signalled=false, first=false: Session is being closed 2025-06-02 23:41:43.163+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.session.helpers.SessionTimeoutListener 75] sessionClosed(ClientSessionImpl[x@/x.x.x.x:x]) not tracked 2025-06-02 23:41:43.163+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 54] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@19d4efc5) closing ParallelCloseable[DefaultCloseFuture[id=ClientSessionImpl[x@/x.x.x.x:x]][value=null]] immediately=true 2025-06-02 23:41:43.164+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.ParallelCloseable 63] doClose(true) pending closeables: 2 2025-06-02 23:41:43.164+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.AbstractCloseable 92] close(ClientConnectionService[ClientSessionImpl[x@/x.x.x.x:x]]) Closing immediately 2025-06-02 23:41:43.166+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.session.helpers.AbstractConnectionService 280] stopHeartBeat(ClientSessionImpl[x@/x.x.x.x:x]) no heartbeat to stop 2025-06-02 23:41:43.166+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.ParallelCloseable 63] doClose(true) pending closeables: 2 2025-06-02 23:41:43.167+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.AbstractCloseable 92] close(ChannelShell[id=0, recipient=6]-ClientSessionImpl[x@/x.x.x.x:x]) Closing immediately 2025-06-02 23:41:43.167+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.channel.AbstractChannel 731] close(ChannelShell[id=0, recipient=6]-ClientSessionImpl[x@/x.x.x.x:x]) no EOF sent 2025-06-02 23:41:43.167+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.channel.AbstractChannel 766] signalChannelClosed(ChannelShell[id=0, recipient=6]-ClientSessionImpl[x@/x.x.x.x:x])[signalChannelClosed] 2025-06-02 23:41:43.168+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.channel.Window 136] Closing LocalWindow[client](ChannelShell[id=0, recipient=6]-ClientSessionImpl[x@/x.x.x.x:x]) 2025-06-02 23:41:43.168+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.channel.Window 136] Closing RemoteWindow[client](ChannelShell[id=0, recipient=6]-ClientSessionImpl[x@/x.x.x.x:x]) 2025-06-02 23:41:43.169+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 54] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@46fa99a5) closing SequentialCloseable[DefaultCloseFuture[id=Builder][value=null]] immediately=true 2025-06-02 23:41:43.169+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 54] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@4dd2e748) closing FuturesCloseable[DefaultCloseFuture[id=ChannelShell[id=0, recipient=-1]-ClientSessionImpl[x@/x.x.x.x:x]][value=null]] immediately=true 2025-06-02 23:41:43.169+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 54] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@4dd2e748) closing [DefaultCloseFuture[id=ChannelShell[id=0, recipient=6]-ClientSessionImpl[x@/x.x.x.x:x]][value=null]] immediately=true 2025-06-02 23:41:43.170+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.channel.ChannelOutputStream 353] close(ChannelOutputStream[ChannelShell[id=0, recipient=6]-ClientSessionImpl[x@/x.x.x.x:x]] SSH_MSG_CHANNEL_DATA) closing 2025-06-02 23:41:43.171+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.channel.AbstractChannel 995] sendEof(ChannelShell[id=0, recipient=6]-ClientSessionImpl[x@/x.x.x.x:x]) already closing or closed - state=Immediate 2025-06-02 23:41:43.171+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 54] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@4dd2e748) closing ParallelCloseable[DefaultCloseFuture[id=Builder][value=null]] immediately=true 2025-06-02 23:41:43.171+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.ParallelCloseable 49] doClose(true) completed pending: 0 2025-06-02 23:41:43.172+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 54] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@4dd2e748) closing SequentialCloseable[DefaultCloseFuture[id=Builder][value=null]] immediately=true 2025-06-02 23:41:43.172+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 54] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@238efbcb) closing [DefaultCloseFuture[id=ChannelShell[id=0, recipient=6]-ClientSessionImpl[x@/x.x.x.x:x]][value=null]] immediately=true 2025-06-02 23:41:43.173+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 54] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@238efbcb) closing GracefulChannelCloseable[ChannelShell[id=0, recipient=6]-ClientSessionImpl[x@/x.x.x.x:x]] immediately=true 2025-06-02 23:41:43.174+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.channel.AbstractChannel$GracefulChannelCloseable 656] close(ChannelShell[id=0, recipient=6]-ClientSessionImpl[x@/x.x.x.x:x])[immediately=true] processing 2025-06-02 23:41:43.174+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 54] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@238efbcb) closing [DefaultCloseFuture[id=ChannelShell[id=0, recipient=6]-ClientSessionImpl[x@/x.x.x.x:x]][value=null]] immediately=true 2025-06-02 23:41:43.175+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.session.helpers.AbstractConnectionService 442] unregisterChannel(ChannelShell[id=0, recipient=6]-ClientSessionImpl[x@/x.x.x.x:x]) result=ChannelShell[id=0, recipient=6]-ClientSessionImpl[x@/x.x.x.x:x] 2025-06-02 23:41:43.176+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.channel.AbstractChannel 754] handleChannelUnregistration(ChannelShell[id=0, recipient=6]-ClientSessionImpl[x@/x.x.x.x:x]) via service=ClientConnectionService[ClientSessionImpl[x@/x.x.x.x:x]] 2025-06-02 23:41:43.176+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 63] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@238efbcb) signal close complete immediately=true 2025-06-02 23:41:43.177+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 63] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@4dd2e748) signal close complete immediately=true 2025-06-02 23:41:43.177+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 54] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@46fa99a5) closing [DefaultCloseFuture[id=ChannelShell[id=0, recipient=6]-ClientSessionImpl[x@/x.x.x.x:x]][value=null]] immediately=true 2025-06-02 23:41:43.178+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 63] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@46fa99a5) signal close complete immediately=true 2025-06-02 23:41:43.178+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.AbstractCloseable 97] close(ChannelShell[id=0, recipient=6]-ClientSessionImpl[x@/x.x.x.x:x])[Immediately] closed 2025-06-02 23:41:43.178+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.ParallelCloseable 49] doClose(true) completed pending: 1 2025-06-02 23:41:43.179+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.ParallelCloseable 49] doClose(true) completed pending: 0 2025-06-02 23:41:43.179+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.AbstractCloseable 97] close(ClientConnectionService[ClientSessionImpl[x@/x.x.x.x:x]])[Immediately] closed 2025-06-02 23:41:43.179+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.ParallelCloseable 49] doClose(true) completed pending: 1 2025-06-02 23:41:43.179+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.ParallelCloseable 49] doClose(true) completed pending: 0 2025-06-02 23:41:43.180+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 54] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@19d4efc5) closing Nio2Session[local=/x.x.x.x:x, remote=/x.x.x.x:x] immediately=true 2025-06-02 23:41:43.180+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.AbstractCloseable 92] close(Nio2Session[local=/x.x.x.x:x, remote=/x.x.x.x:x]) Closing immediately 2025-06-02 23:41:43.180+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.io.nio2.Nio2Session 268] doCloseImmediately(Nio2Session[local=/x.x.x.x:x, remote=/x.x.x.x:x]) closing socket=sun.nio.ch.UnixAsynchronousSocketChannelImpl[connected local=/x.x.x.x:x remote=/x.x.x.x:x] 2025-06-02 23:41:43.182+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.io.nio2.Nio2Session 274] doCloseImmediately(Nio2Session[local=/x.x.x.x:x, remote=/x.x.x.x:x]) socket=sun.nio.ch.UnixAsynchronousSocketChannelImpl[closed] closed 2025-06-02 23:41:43.183+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.io.nio2.Nio2Service 147] unmapSession(id=110): Nio2Session[local=/x.x.x.x:x, remote=/x.x.x.x:x] 2025-06-02 23:41:43.183+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.AbstractCloseable 101] close(ClientSessionImpl[x@/x.x.x.x:x])[Immediately] state already Immediate 2025-06-02 23:41:43.183+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.AbstractCloseable 97] close(Nio2Session[local=/x.x.x.x:x, remote=/x.x.x.x:x])[Immediately] closed 2025-06-02 23:41:43.184+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 63] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@19d4efc5) signal close complete immediately=true 2025-06-02 23:41:43.184+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.AbstractCloseable 97] close(ClientSessionImpl[x@/x.x.x.x:x])[Immediately] closed 2025-06-02 23:41:43.184+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.closeable.AbstractCloseable 101] close(Nio2Session[local=/x.x.x.x:x, remote=/x.x.x.x:x])[Immediately] state already Closed Log No.3, Read 2025-06-02 23:41:43.191+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.logging.LoggingUtils 242] decode(ClientSessionImpl[xxxx]) packet #17247 [chunk #33](2057/2057) 20 20 20 20 20 20 20 20 20 ......... 2025-06-02 23:41:43.191+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.session.helpers.AbstractSession 578] doHandleMessage(ClientSessionImpl[xxxx]) process #17246 SSH_MSG_CHANNEL_DATA 2025-06-02 23:41:43.191+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler 55] handleUnknownChannelCommand(ClientSessionImpl[xxxx]) received SSH_MSG_CHANNEL_DATA command for unknown channel: 0 2025-06-02 23:41:43.191+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler 84] handleUnknownChannelCommand(ClientSessionImpl[xxxx]) received msg channel data (opcode=94) reply=false 2025-06-02 23:41:43.251+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.util.logging.LoggingUtils 242] decode(ClientSessionImpl[x.x.x.x:x]) packet #17264 [chunk #33](2057/2057) 20 20 20 20 20 20 20 x x .......xx 2025-06-02 23:41:43.251+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.session.helpers.AbstractSession 578] doHandleMessage(ClientSessionImpl[x.x.x.x:x]) process #17263 SSH_MSG_CHANNEL_DATA 2025-06-02 23:41:43.252+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler 55] handleUnknownChannelCommand(ClientSessionImpl[x.x.x.x:x]) received SSH_MSG_CHANNEL_DATA command for unknown channel: 0 2025-06-02 23:41:43.252+0800 TRACE [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler 84] handleUnknownChannelCommand(ClientSessionImpl[x.x.x.x:x]) received msg channel data (opcode=94) reply=false 2025-06-02 23:41:43.252+0800 DEBUG [sshd-SshClient[2e89bfdc]-nio2-thread-25][ROOT][org.apache.sshd.common.io.nio2.Nio2Session 414] handleReadCycleCompletion(Nio2Session[local=/x.x.x.x:x, remote=/x.x.x.x:x]) IoSession has been closed, stop reading 2025-06-02 23:41:45.918+0800 DEBUG [pool-21-thread-1][ROOT][org.apache.sshd.common.util.closeable.AbstractCloseable 92] close(SshClient[2e89bfdc]) Closing immediately 2025-06-02 23:41:45.918+0800 TRACE [pool-21-thread-1][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 54] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@2dc61b36) closing [DefaultCloseFuture[id=SshClient[2e89bfdc]][value=null]] immediately=true 2025-06-02 23:41:45.918+0800 TRACE [pool-21-thread-1][ROOT][org.apache.sshd.common.helpers.AbstractFactoryManager 372] removeSessionListener(SshClient[2e89bfdc])[org.apache.sshd.common.session.helpers.SessionTimeoutListener@1346df51] removed 2025-06-02 23:41:45.918+0800 TRACE [pool-21-thread-1][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 54] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@2dc61b36) closing org.apache.sshd.common.io.nio2.Nio2Connector@3bb0f943 immediately=true 2025-06-02 23:41:45.919+0800 DEBUG [pool-21-thread-1][ROOT][org.apache.sshd.common.util.closeable.AbstractCloseable 92] close(org.apache.sshd.common.io.nio2.Nio2Connector@3bb0f943) Closing immediately 2025-06-02 23:41:45.919+0800 TRACE [pool-21-thread-1][ROOT][org.apache.sshd.common.util.closeable.ParallelCloseable 49] doClose(true) completed pending: 0 2025-06-02 23:41:45.919+0800 DEBUG [pool-21-thread-1][ROOT][org.apache.sshd.common.util.closeable.AbstractCloseable 97] close(org.apache.sshd.common.io.nio2.Nio2Connector@3bb0f943)[Immediately] closed 2025-06-02 23:41:45.919+0800 TRACE [pool-21-thread-1][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 54] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@2dc61b36) closing org.apache.sshd.common.io.nio2.Nio2ServiceFactory@f1f2102 immediately=true 2025-06-02 23:41:45.919+0800 DEBUG [pool-21-thread-1][ROOT][org.apache.sshd.common.util.closeable.AbstractCloseable 92] close(org.apache.sshd.common.io.nio2.Nio2ServiceFactory@f1f2102) Closing immediately 2025-06-02 23:41:45.919+0800 DEBUG [pool-21-thread-1][ROOT][org.apache.sshd.common.io.nio2.Nio2ServiceFactory 82] Shutdown group 2025-06-02 23:41:45.920+0800 DEBUG [pool-21-thread-1][ROOT][org.apache.sshd.common.io.nio2.Nio2ServiceFactory 87] Group successfully shut down 2025-06-02 23:41:45.921+0800 DEBUG [pool-21-thread-1][ROOT][org.apache.sshd.common.io.AbstractIoServiceFactory 74] Shutdown executor 2025-06-02 23:41:45.934+0800 DEBUG [pool-21-thread-1][ROOT][org.apache.sshd.common.io.AbstractIoServiceFactory 77] Shutdown complete 2025-06-02 23:41:45.934+0800 DEBUG [pool-21-thread-1][ROOT][org.apache.sshd.common.util.closeable.AbstractCloseable 97] close(org.apache.sshd.common.io.nio2.Nio2ServiceFactory@f1f2102)[Immediately] closed 2025-06-02 23:41:45.934+0800 TRACE [pool-21-thread-1][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 54] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@2dc61b36) closing [DefaultCloseFuture[id=SshClient[2e89bfdc]][value=null]] immediately=true 2025-06-02 23:41:45.934+0800 DEBUG [pool-21-thread-1][ROOT][org.apache.sshd.common.util.closeable.SequentialCloseable$1 63] doClose(org.apache.sshd.common.util.closeable.SequentialCloseable$1@2dc61b36) signal close complete immediately=true 2025-06-02 23:41:45.935+0800 DEBUG [pool-21-thread-1][ROOT][org.apache.sshd.common.util.closeable.AbstractCloseable 97] close(SshClient[2e89bfdc])[Immediately] closed -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org