I am using jsch
to connect to a sftp server and download files.
My file size is 4.4MB.
The error is received message is too long
.
What is the max limit of file size that can be downloaded?
Is there any config to change the max size limit?
heres how i connect session = jsch.getSession("##", "##", 22); session.setPassword("##"); session.setConfig("StrictHostKeyChecking", "no"); session.connect(); sftpChannel = (ChannelSftp)session.openChannel("sftp"); sftpChannel.connect(); sftpChannel.cd("##"); sftpChannel.lcd("##");
and the error message is
Error when fetching server responses from SFTP server. at com.scheduler.DataDiaryDataPullJob.main(DataDiaryDataPullJob.java:60) [classes/:na] Caused by: com.jcraft.jsch.JSchException: 4: Received message is too long: 1416128878 at com.jcraft.jsch.ChannelSftp.start(ChannelSftp.java:315) ~[jsch-0.1.50.jar:na] at com.jcraft.jsch.Channel.connect(Channel.java:152) ~[jsch-0.1.50.jar:na] at com.jcraft.jsch.Channel.connect(Channel.java:145) ~[jsch-0.1.50.jar:na] at com.scheduler.DataDiaryDataPullJob.downloadSurveyFiles(DataDiaryDataPullJob.java:152) [classes/:na] ... 2 common frames omitted Caused by: com.jcraft.jsch.SftpException: Received message is too long: 1416128878 at com.jcraft.jsch.ChannelSftp.start(ChannelSftp.java:265) ~[jsch-0.1.50.jar:na] ... 5 common frames omitted
Thanks, Sunil