Hi ,
We have a sample program
import java.*;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
public class exampleread
{
public static void main(String[] args)
{
InputStream io1 = System.in;
byte[] buf = new byte[32768];
int i = -1;
try {
* i=io1.read(buf, 0, 32768);*
String str = new String(buf);
System.out.println ("I read " + buf + "as string" + str);
}
catch (Exception e)
{
System.out.println("Excecption received" + e );
}
}
}
In this program when we change the value of the third parameter of the
read call to value greater than 26608 we get the following exception when
run in windows XP with java version 1.6.0_22
*java.io.IOException: Not enough storage is available to process this
command*
But the same program is working fine when it is run in windows 7 machine
with same JRE version even if we increase the values upto 32767.
Could you please let us know what would be the reason behind this. Is this
a limitation of the read call over the operating system used.
Thanks
Aarthi
On Fri, May 30, 2014 at 12:09 PM, aarthit 2014 <aarthit2...@gmail.com>
wrote:
> Hi ,
>
> Thanks for the reply, when we added debugs we saw that the code hit
> the part in this read function call on reaching the read call the
> session freezes.
>
> The value rmpzize we understand that is a value that comes from the
> ssh server. we confirmed this by testing with different ssh servers.
> The values were
> OpenSSH server 32760
> libSSH server 34902
>
> This is not specific to a particular server. when we verified in 2
> different servers we saw the same issue of session hang in the read
> call .
> when we change the value of this rmpsize starting from 1000 to 26608
> for libssh server the session was working fine. which implies that the
> client is not able to handle the size received from the SSH server.
> But as per the RFC that we had already quoted the size obtained from
> Openssh and libssh are also valid (32760 and 34902). Even they are
> valid when the Jsch does a java read call it is not handling the
> rmpsize properly. we suspect the issue with the java implementation.
>
> Kindly share your thoughts.
>
> Thanks
> Aarthi
>
>
> On Thu, May 22, 2014 at 11:16 AM, Atsuhiko Yamanaka <y...@jcraft.com>
> wrote:
> >
> > Hi,
> >
> > +-From: aarthit 2014 <aarthit2...@gmail.com> --
> > |_Date: Tue, 20 May 2014 10:45:33 +0530 _______
> > |
> > |The third parameter for the read() is derived from the rmpsize which
> is
> > |Remote max packet size which is received from the SSH server.
> >
> > No, that size means that how long data SSH server can receive.
> > Have you confirmed that the program has freezed in read() method?
> >
> > I guess the program has freezed in sending data to the SSH server.
> > I don't know the reason, but your network environment may have problems
> > in transferring long data, or your SSH sever may have problems
> > in receiving long data.
> >
> >
> > Sincerely,
> > --
> > Atsuhiko Yamanaka
> > JCraft,Inc.
> > 1-14-20 HONCHO AOBA-KU,
> > SENDAI, MIYAGI 980-0014 Japan.
> > Tel +81-22-723-2150
> > Skype callto://jcraft/
> > Twitter: http://twitter.com/ymnk
> > Facebook: http://facebook.com/aymnk
>
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users