[ https://issues.apache.org/jira/browse/SSHD-848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roberto Deandrea updated SSHD-848: ---------------------------------- Comment: was deleted (was: Hi Lyor, I submitted a new pull request as you requested. [https://github.com/apache/mina-sshd/pull/68/commits/9f2d49a97963d9f4330d96578142d67e06b44c07] Cheers. Roberto ) > Possible bug opening local port forwarding channel > -------------------------------------------------- > > Key: SSHD-848 > URL: https://issues.apache.org/jira/browse/SSHD-848 > Project: MINA SSHD > Issue Type: Bug > Affects Versions: 2.0.1 > Reporter: Roberto Deandrea > Priority: Major > Attachments: testlpf.ko, testlpf.ok > > > Hi , We found a possible bug opening a local port forwarding channel. > Scenario : The SSH client and server are based on Apache SSHD 2.0.1. There is > a FTP client sending a file through a local port forwarding channel to a > target server. > The problem manifests when the SSH server is busy and returns the > SSH_MSG_CHANNEL_OPEN_CONFIRMATION with a some delay and the client is very > fast to send only a few bytes on a local port forwarding channel. > The outcome is the FTP client is NOT able to send bytes through the channel > to the target server. > Into SSH client traces we see : > org.apache.sshd.common.channel.WindowClosedException: Already closed: > Window[client/remote](TcpipClientChannel[id=4, > recipient=4]-ClientSessionImpl[roberto@/192.168.50.61:10022]) > > According to us there is a chance that if we don't AWAIT the local port > forward channel is TOTALLY opened, when the client is very fast to send > bytes... it closes its connection, ao the channel that is already closing > prevents bytes to flow through the channel to the target server. > > We guess there is a code bug in *DefaultForwardingFilter.sessionCreated()* > method. > We add the following line at the end of the method and the problem seems > definitely fixed. > *channel.getOpenFuture().await();* > > Please, can you troubleshoot this issue and comment about our potential code > fix ? > Thanks in advance. > > I attached the files: > testslpf.ko SSH client traces with original code and a failed attempt > testslpf.ok SSH client traces with our code changes and a successful attempt > -- This message was sent by Atlassian JIRA (v7.6.3#76005)