Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

IOException from sftp.ls on large dir

Help
2009-06-05
2013-05-28
  • Mark Stuppy
    Mark Stuppy
    2009-06-05

    Hello,

    We're using JSCH 0.1.40, try to do sftpChannel.ls(".") on a directory with over 900 files in it.  This errors with the following:

    Caused by: 4:
            at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1342)
            ... 11 more
    Caused by: java.io.IOException: inputstream is closed
            at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2325)
            at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2349)
            at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1239)
            ... 12 more

    I've seen similar issues brought up elsewhere, but no solutions.  Any suggestions?

    Thanks,
    Mark