Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSch not closing sshd?

 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic