jcraft jsch throws "inputstream closed" exception

92 Views Asked by At

When downloading a file close to 2 GB size from remote FTP site, we are seeing the below error and not able to proceed. Interesting thing is file gets downloaded but probably during final stages it encounters this exception. Anyone encountered this issue? Could you please help about how to handle this exception?

jsch version used - 0.1.51

4: 
    at com.jcraft.jsch.ChannelSftp._get(ChannelSftp.java:1160)
    at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1006)
    at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:984)
    at SFTPTest.main(SFTPTest.java:23)
Caused by: java.io.IOException: inputstream is closed
    at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2884)
    at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2908)
    at com.jcraft.jsch.ChannelSftp.checkStatus(ChannelSftp.java:2446)
    at com.jcraft.jsch.ChannelSftp._sendCLOSE(ChannelSftp.java:2465)
    at com.jcraft.jsch.ChannelSftp._get(ChannelSftp.java:1155)
    ... 3 more
0

There are 0 best solutions below