What exactly are you doing after channel.connect()?
Do you have any try/catch, read-write loops, and such?
Can you post the rest of the code until channel.disconnect()?

Tobia


> On 18 May 2016, at 10:04, Offer Baruch <offerbar...@gmail.com> wrote:
> 
> 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 <offerbar...@gmail.com 
> <mailto:offerbar...@gmail.com>> 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
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to