I am performing FTP file transfer using JAVA. I'm using Apache's FTPClient and FTPServer classes. In a specific environment, sometimes the files are not transferred. I call the enterLocalPassiveMode method of FTPClient before calling the login method and even then sometimes the file is not transferred.
The storeFile method of FTPCLient returns "false". The getReplyString method of the FTPClient returns "200 Command TYPE okay". The list method of FTPClient returns "227".
When the file is successfully transferred the returns are as follows: The list method of FTPCLlient returns 150. The getReplyString method of the FTPClient returns "150 File status okay; about to open data connection".
Is there a Firewall problem?
I tried to use passive port range in the FTPServer using the setPassivePorts method of the DataConnectionConfigurationFactory class, but the problem continues.
Is there any way to set a range of ports on the client side? How can I check if the connection is actually using passive mode?
Thanks in advance.