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

ASF GitHub Bot commented on KARAF-6895:
---------------------------------------

jbonofre merged pull request #1247:
URL: https://github.com/apache/karaf/pull/1247


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> ssh-commands not properly return
> --------------------------------
>
>                 Key: KARAF-6895
>                 URL: https://issues.apache.org/jira/browse/KARAF-6895
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.3.0
>            Reporter: Tim B.
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>
> Hi Karaf-Team,
> after updating from Karaf 4.2.8 to Karaf 4.3.0 most of our automation scripts 
> doesn't work anymore.
> When we execute a command via ssh, the prompt doesn't return properly.
> {code:java}
> tb@jenkins:~$ ssh -p 8101 karaf@vm1 'info | grep "Karaf version"'
> Password authentication
> Password:
>   Karaf version               4.3.0
> {code}
> The relevant part is after the result of the command, the bash didn't return. 
> I have to press ctrl+c or something similar to get back to bash (or wait for 
> a timeout).
> On Karaf 4.2.0 the ssh immediatly returned after executing the command:
> {code:java}
> tb@jenkins:~$ ssh -p 8101 karaf@vm1 'info | grep "Karaf version"'
> Password authentication
> Password:
>   Karaf version               4.2.8
> tb@jenkins:~$
> {code}
> I have fixed this by editing the finally block at the end of
> _org.apache.karaf.shell.ssh.ShellCommand#run_ from
> {code:java}
> } finally {
>     StreamUtils.close(in, out, err);
>     callback.onExit(exitStatus);
> }
> {code}
> to 
> {code:java}
> } finally {
>     callback.onExit(exitStatus);
>     StreamUtils.close(in, out, err);
> }
> {code}
> callback.onExit needs to write into the out-Stream. So it throws an Exception 
> when it was closed before.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to