Hello !
First of all, thanks for the really quick answer.
I checked the version and the server we're using for the tests has
OpenSSH_4.7p1 and Ubuntu 8.04 LTS. I've tested on another server with 5.1
and it did work. The server is also significantly slower to respond because
it's at home and on a regular ADSL connection. However, I do not think that
makes any difference if the connection is slower as, yesterday, I
voluntarily tried to limit the number of connection per second and it still
did crash after a approximatively the same number of overall connections.
I guess that it is in fact an OpenSSH bug which is solved in newer versions.
Thanks once again for your answer !
Best regards,
Ir Maximilien Renard
P.S. In case the problem should still be observed when we will upgrade our
test server, I will of course report back.
On 17 April 2012 09:29, Atsuhiko Yamanaka <[email protected]> wrote:
> Hi,
>
> +-From: Maximilien Renard <[email protected]> --
> |_Date: Mon, 16 Apr 2012 18:20:33 +0200 __________
> |
>
> |Saddly, as I started stress-testing the application, I've noticed
> |that after a certain number of file SFTP transfer, the library
> |"crashes" with the following message:
>
> |1: Caught an exception, leaving main loop due to SSH_MSG_DISCONNECT: 2
> |Could not create socket pairs: Too many open files
> |1: Disconnecting from 195.244.167.187 port 10004
>
> It seems "socket pairs" means the Unix domain sockets for the communication
> between "sshd" and "/usr/libexec/openssh/sftp-server", and it has been
> failed
> to create them due to "Too many open files", as the message says.
>
> At least, I guess that you can work around that error if the channel is
> re-used without invoking "closeAndDisconnectSftpChannel()".
>
> As for the problem, I have confirmed that the following chunk of code
> will cause the reported error for sftp-server of OpenSSH 4.3p2,
>
> for(int i = 0; i< 1024; i++){
> try{
> ChannelSftp c = (ChannelSftp)session.openChannel("sftp");
> c.connect();
> c.disconnect();
> }
> catch(Exception e){
> System.out.println("i: "+i+" "+e);
> break;
> }
> }
>
> However, I could not reproduce it for sftp-server of OpenSSH 5.3p1.
>
> Which OpenSSH version are you using? Frankly to say, I have not found
> the problem in JSch yet, and have suspected that the older OpenSSH versions
> may have the resource leaks in managing Unix sockets.
>
>
> 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
>
--
Ir Maximilien Renard
[email protected]
[email protected]
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users