Re: [JSch-users] JSCH .53 return empty strings executing commands on ubuntu
Status: Alpha
Brought to you by:
ymnk
|
From: Offer B. <off...@gm...> - 2016-05-18 08:05:05
|
can someone confirm you can actually see this?
i would like to add some more data to this issue.
this is the way i configure my channel:
Channel channel = session.openChannel("exec");
((ChannelExec) channel).setPty(true);
((ChannelExec) channel).setPtyType("dumb");
((ChannelExec) channel).setCommand(command);
connOut = channel.getOutputStream();
connIn = channel.getInputStream();
connErr = ((ChannelExec) channel).getErrStream();
channel.connect();
when i mark the setPty to false everything works fine...
when it is true i get the random error...
i tries different terminal types but that did not solve anything...
please i really need some help here...
thanks
Offer Baruch
On Tue, May 17, 2016 at 10:10 AM, Offer Baruch <off...@gm...>
wrote:
> Hello
>
> I am new to the list but using JSCH for a long time accessing redhat and
> sles...
> Lately i started using it to access ubuntu but i am having a very strange
> issue.
> The code i am using is shared for all distors and versions but
> specifically on ubuntu every once in about 100 commands i issue (in
> average) i get back an empty string.
> No exceptions, input stream simply reaches EOF.
> I was able to recreate the issue running the same command 400 times.
> Specifically "echo offer".
> In average 4 times will return an empty string. In the real world this
> happen randomly on a different command each time.
> It only happens with ubuntu (i am using 16.04).
> I am using an exec session to run my commands with jsch .53.
> Does this ring a bell to anyone?
> How can i proceed to solve or get around this problem? is there any debug
> options i can use?
> I am not able to reproduce without jsch... i tried simple ssh with a
> single command.
>
> Can someone point me in the right direction?
>
> Thanks on advance
> Offer Baruch
>
|