[ 
https://issues.apache.org/jira/browse/SSHD-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13919671#comment-13919671
 ] 

Guillaume Nodet commented on SSHD-295:
--------------------------------------

What you're doing isn't supported.  The Command#start method specifies that the 
implementation should spawn a new thread.
Your implementation synchronously calls callback.onExit() which sends an EOF 
and a CLOSE messages before the current thread has any way to return the 
SSH_MSG_CHANNEL_SUCCESS message back to the client.

Try modifying your code in a way that the callback is always called from a 
separate thread.

We can consider that a limitation and maybe enhance that in the future though.

> Error connecting via Jenkins/trilead-ssh2
> -----------------------------------------
>
>                 Key: SSHD-295
>                 URL: https://issues.apache.org/jira/browse/SSHD-295
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 0.10.0
>         Environment: Windows= 7 (64 bits)
> Java= 1.7.0_45 (64 bits)
> trilead-ssh2=build217-jenkins-3
>            Reporter: Clecio Varjao
>
> Jenkins is having issues connecting to a apache sshd server 0.10.0 (it works 
> with 0.9.0)
> TestCase:
> https://github.com/cvarjao/jenkins-sshd/blob/master/src/test/java/org/apache/sshd/TriledClientTest.java
> POM file:
> https://github.com/cvarjao/jenkins-sshd/blob/master/pom.xml
> Caused by: java.io.IOException: This SSH2 channel is not open (Close 
> requested by remote)
>       at 
> com.trilead.ssh2.channel.ChannelManager.waitForChannelRequestResult(ChannelManager.java:176)
>       at 
> com.trilead.ssh2.channel.ChannelManager.requestExecCommand(ChannelManager.java:778)
>       ... 30 more



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to