Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
224 views
in Java FTP by (210 points)

Hello,

We are getting this error on certain files 

-----------------------------------------------------------------------------------------------------------------------

TRACE:2024-07-11 17:02:46 ERROR [SftpClient] 11 Jul 2024 17:02:46.169 : get(/Outgoing/HD_FINAL_MARCH_2024_GE_835_20240710.txt) failed : FXP_READ mismatch. Requested: 65535 received: 32768

com.enterprisedt.net.j2ssh.transport.SFTPReadMismatchException: FXP_READ mismatch. Requested: 65535 received: 32768

at com.enterprisedt.net.j2ssh.SftpClient.a(SftpClient.java:733)         at com.enterprisedt.net.j2ssh.SftpClient.get(SftpClient.java:944)         at com.enterprisedt.net.ftp.ssh.SSHFTPClient.get(SSHFTPClient.java:1379)

-----------------------------------------------------------------------------------------------------------------

and saw in one reply to call setMaxQueuedReadRequests(1) prior to connection.

First question is what this actually accomplishes and secondly was wondering if it's also possible to set it through JVM System Properties with -D

which would make it much easier to configure things for compiled code instead of having

to add it in Java and re-compile

Thanks!

Jan 

1 Answer

0 votes
by (162k points)

The server doesn't appear to support queued requests (which is a speed optimization), so you may need to call setMaxQueuedReadRequests(1). There's no way to set it through system properties, unfortunately.

by (210 points)
Thanks for the quick answer! Appreciate it.

Does this look ok to you?

SSHFTPClient ftp = new SSHFTPClient();
ftp.setMaxQueuedReadRequests(1);

Thanks!

Jan
by (162k points)
Yes, that's how to do it - prior to connecting.
by (210 points)
Thanks, gong to try it out.

Categories

...