aspose file tools*
The moose likes Other Open Source Projects and the fly likes JSch not closing sshd? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "JSch not closing sshd?" Watch "JSch not closing sshd?" New topic
Author

JSch not closing sshd?

Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi all,

Has anyone seen where JSch leaves sshd sessions open?

I've got a java client which performs regular SFTP connections (it polls every 30 seconds) and it seems to occasionally (but not always) leave behind a sshd session. These eventually build up over time and causes us to have a "too many files open" exception in the OS (it hits the limit per process for those who are interested).

In my client I close the SFTPChannel, then the Channel (redundant really as closing the SFTPChannel closes the Channel) and lastly the Session, so I'm pretty sure I'm cleaning up correctly (and I can see I have a 'disconnect' for each 'connect', so they do marry up).

This occurs with 0.1.34, 0.1.38 and 0.1.40, running on OpenSSH and *NIX


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSch not closing sshd?