You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Volth (JIRA)" <ji...@apache.org> on 2015/11/06 05:26:27 UTC

[jira] [Closed] (SSHD-579) The last portion of stdout is not received

     [ https://issues.apache.org/jira/browse/SSHD-579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Volth closed SSHD-579.
----------------------
    Resolution: Invalid

Not Mina-SSHD bug, reproducible with other clients

> The last portion of stdout is not received
> ------------------------------------------
>
>                 Key: SSHD-579
>                 URL: https://issues.apache.org/jira/browse/SSHD-579
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 1.0.0
>            Reporter: Volth
>
> Simple client code:
> {code:java}
>       import org.apache.sshd
>       import scala.collection.JavaConversions._
>       val client = sshd.client.ClientBuilder.builder.build()
>       client.start()
>       val session = client.connect("root", host, 22).verify().getSession()
>       session.addPasswordIdentity(pw)
>       session.auth().verify()
>       // 'bash -c' not needed; it increases % of reproducibility
>       val channel = session.createExecChannel("/bin/bash -c \"/bin/ping -c3 8.8.8.8\"") 
>       channel.setOut(new sshd.common.util.io.NoCloseOutputStream(System.out))
>       channel.setErr(new sshd.common.util.io.NoCloseOutputStream(System.err))
>       channel.setUsePty(true)
>       channel.open().verify()
>       channel.waitFor(List(sshd.client.channel.ClientChannel.ClientChannelEvent.CLOSED), 0)
>       println("channel.getExitStatus="+channel.getExitStatus)
> {code}
> When there is Ubuntu 15.10 (openssh-6.9) on the server and setUsePty is set to true, the last message with stdout data (SSH_MSG_CHANNEL_DATA) is often lost:
> http://i.imgur.com/LNdNSRq.png
> There is no bug 
>  * either with setUsePty(false) 
>  * or with Ubuntu 15.04 (openssh-6.7) or older on the server.
>  * or with OpenSSH client (even a very old): "ssh -t -vvv root@server /bin/bash -c '/bin/ping -c3 8.8.8.8'" always receives all messages
> I tried Mina SSHD 1.0.0 and the latest revision from github's master branch.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)