Uploaded image for project: 'MINA SSHD'
  1. MINA SSHD
  2. SSHD-1257

Shell is not getting closed if the command has already closed the OutputStream it is using.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.9.0
    • 2.9.0
    • None

    Description

      When running a org.apache.sshd.server.command.Command, if it happens to close the OutputStream instance it is using, then later when the ssh session closes, it attempts to flush the output stream before closing it.

      This causes theĀ  following warning to be printed on server side

      WARNING o.a.s.s.channel.ChannelSession#lambda$prepareCommand$0: onExit(ChannelSession[id=0, recipient=0]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:49944]) code=0 message='' SshChannelClosedException closing shell: flush(ChannelOutputStream[ChannelSession[id=0, recipient=0]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:49944]] SSH_MSG_CHANNEL_DATA) length=0 - stream is already closed
      

      and EOF is never sent to client.

      Attachments

        Issue Links

          Activity

            People

              twolf Thomas Wolf
              vlatombe Vincent Latombe
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 20m
                  2h 20m