This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


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: 3275
    
    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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: JSch not closing sshd?
 
jQuery in Action, 3rd edition