[ https://issues.apache.org/jira/browse/SSHD-795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16345167#comment-16345167 ]
Goldstein Lyor edited comment on SSHD-795 at 1/30/18 2:58 PM: -------------------------------------------------------------- {quote}In the attached file apache-sshd.trace.zip {quote} I have tried looking at the attached log, but it is way too large (~20MB) to locate the code in question. Can you cut out the sections that you think are relevant to the issue and attach them as well (separately) ? In any case, it may take quite a while until I can get around to debugging it - so if you have some spare time and willing to contribute to this project I invite you to try debugging it and maybe diagnose what is going on. A good starting point is the {{TcpipServerChannel}} and what happens when it encounters a problem while trying to communicate with its peer... P.S. Please make sure that the one severing the session is the server and not the client... was (Author: lgoldstein): {quote}In the attached file apache-sshd.trace.zip{quote} I have tried looking at the attached log, but it is way too large (~20MB) to locate the code in question. Can you cut out the sections that you think are relevant to the issue and attach them as well (separately) ? In any case, it may take quite a while until I can get around to debugging it - so if you have some spare time and willing to contribute to this project I invite you to try debugging it and maybe diagnose what is going on. A good starting point is the {{TcpipServerChannel}} and what happens when it encounters a problem while trying to communicate with its peer... > IOException (Broken pipe) on a socket local forwarding channel causes SSH > client-server connection down > ------------------------------------------------------------------------------------------------------- > > Key: SSHD-795 > URL: https://issues.apache.org/jira/browse/SSHD-795 > Project: MINA SSHD > Issue Type: Bug > Affects Versions: 1.7.0 > Reporter: Roberto Deandrea > Priority: Major > Attachments: apache-sshd.trace.zip > > > Hi, > I have a problem with local port forwarding mechanism implemented in Apache > SSHD. > In my company we successfully use Apache SSHD library for secure local socket > forwarding protocols. > When on a local port forwarding channel an IOException (Broken pipe) happen > for some reason (network, etc...), the SSH client server is being > disconnected abruptly. > I'm not convinced this is the right behavior. I think it is not necessary to > bring down SSH client server connection because this is not a protocol > violation, but a socket problem related to forwarded remote server connection. > Please, can you comment about this issue ? > Follow an excerpt of the traces : > {quote} > 2018-01-23 10:30:10,017 DEBUG [sshd-SshServer[1786f9d5]-nio2-thread-2 ] > [Nio2Session.handleWriteCycleFailure] > handleWriteCycleFailure(Nio2Session[local=/192.168.180.70:38957, > remote=/192.168.10.31:36228]) failed (IOException) to write 32768 bytes: > Broken pipe > 2018-01-23 10:30:10,017 DEBUG [sshd-SshServer[1786f9d5]-nio2-thread-3 ] > [Window.waitForSpace] > waitForSpace(Window[server/remote](TcpipServerChannel[id=662, > recipient=11]-ServerSessionImpl[circessh@/192.168.190.2:14840])) available: > 1146880 > 2018-01-23 10:30:10,017 DEBUG [sshd-SshServer[1786f9d5]-nio2-thread-2 ] > [TcpipServerChannel.handleWriteDataFailure] > handleWriteDataFailure(TcpipServerChannel[id=662, > recipient=11]-ServerSessionImpl[circessh@/192.168.190.2:14840])[SSH_MSG_CHANNEL_DATA] > failed (IOException) to write len=32768: Broken pipe > 2018-01-23 10:30:10,018 WARN [sshd-SshServer[1786f9d5]-nio2-thread-2 ] > [AbstractSession.exceptionCaught] > exceptionCaught(ServerSessionImpl[circessh@/192.168.190.2:14840])[state=Opened] > IOException: Broken pipe > 2018-01-23 10:30:10,018 DEBUG [sshd-SshServer[1786f9d5]-nio2-thread-3 ] > [Window.waitAndConsume] > waitAndConsume(Window[server/remote](TcpipServerChannel[id=662, > recipient=11]-ServerSessionImpl[circessh@/192.168.190.2:14840])) - > requested=32768, available=1146880 > 2018-01-23 10:30:10,018 DEBUG [sshd-SshServer[1786f9d5]-nio2-thread-2 ] > [AbstractSession.exceptionCaught] > exceptionCaught(ServerSessionImpl[circessh@/192.168.190.2:14840])[state=Opened] > details > 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.finishWrite(UnixAsynchronousSocketChannelImpl.java:582) > at > sun.nio.ch.UnixAsynchronousSocketChannelImpl.finish(UnixAsynchronousSocketChannelImpl.java:195) > at > sun.nio.ch.UnixAsynchronousSocketChannelImpl.onEvent(UnixAsynchronousSocketChannelImpl.java:213) > at sun.nio.ch.EPollPort$EventHandlerTask.run(EPollPort.java:293) > at java.lang.Thread.run(Thread.java:745) > 2018-01-23 10:30:10,023 DEBUG [sshd-SshServer[1786f9d5]-nio2-thread-1 ] > [Nio2Session.writePacket] > writePacket(Nio2Session[local=/192.168.180.70:45470, > remote=/192.168.10.31:22]) Writing 24780 bytes > 2018-01-23 10:30:10,025 DEBUG [sshd-SshServer[1786f9d5]-nio2-thread-2 ] > [SessionTimeoutListener.sessionException] > sessionException(ServerSessionImpl[circessh@/192.168.190.2:14840]) > IOException: Broken pipe > {quote} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)