Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.8k views
in Java FTP by (180 points)
We are going to buy a Java ftp library that supports FTP, FTPS and SFTP and edtFTPj/PRO meets the requirements. I have downloaded evaluation version and started test it, as a result I see that there are some issues:
1) if I start more then 5 simultaneous downloads in different threads in one JVM for the same user then at least one process hangs. I see this issue for FTP and FTPS clients on Pureftp and FileZilla servers, but I don't see it for SFTP;
2) I get "java.net.SocketException: Connection reset" when call quit() for ftp clent only when server is pureftp

Could you please clarify are these issues real and are you going to fix them.

2 Answers

0 votes
by (162k points)
1) FTP and FTPS are completely different protocols to SFTP, and in some ways inferior.

For every data transfer (which includes directory listings), FTP/S consumes a new socket. There is a very finite limit to the number of sockets available, and hence you have to be very careful doing simultaneous downloads. The best approach is to use a connection pool and process a queue of requests.

Also, many FTP servers will limit the number of connections possible by one user.

SFTP uses a single channel for commands and data, and doesn't create new channels per data transfer, hence it doesn't have these problems.

edtFTPj/PRO 2.0 will have a connection pool and support asynchronous requests - expect it out by the end of this quarter. This will help to avoid this issue.

2) This is probably the result of the server implementing the FTPS protocol badly. Try

ftp.setConfigFlags(SSLFTPClient.ConfigFlags.DISABLE_SSL_CLOSURE)

If it is occuring for FTP (not FTPS), use quitImmediately() instead of quit().
0 votes
by (180 points)
Thank you for reply

Categories

...