You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to FTP into my web space. It works fine via the shell. With Cyberduck, it seems its connecting to the web space, but fails to list the files in the directory and disconnects.
I am not sure why. I have tried both FTP and FTP-SSL.
FYI
-Bulent
The text was updated successfully, but these errors were encountered:
PROBLEM DESCRIPTION:
"new FTPPassiveDataSocket(new Socket(ipAddress, port));"
This line of code is causing trouble. In case of passive mode "new Socket" might time out. In that casel a ConnectException is thrown. This exception is not taken to consideration. The 'fallback' is only watching 'FTPException' which in this case is not thrown, therefore there is no fallback to 'active' mode.
SUGGESTION:
imho the current implementation is not taking care of the timeout. To my understanding, according to j2se/1.4.2/docs/api/java/net/Socket.html#setSoTimeout(int), it would be possible to get a java.net.SocketTimeoutException.
I'm not a huge java developer so this is just a suggestion, please drop it if it's not useful.
I've spent some time with inspecting this further on. As I googled it, it seems it's impossible to set timeout for a new Socket, so here the code always have to wait 60 seconds. The setSoTimeout(int) or the socket.connect(ip, timeout), effects only already opened connections. Unfortunately in this case no specific exception is thrown, but ConnectException. ConnectException != TimeoutException, but maybe in this specific case it could be used to start a 'fallback' for the other type of connection. If both active and passive fails with ConnectException, a specific flag could be set, and user could be informed that there was a ConnectExcepion?
I have been trying to FTP into my web space. It works fine via the shell. With Cyberduck, it seems its connecting to the web space, but fails to list the files in the directory and disconnects.
I am not sure why. I have tried both FTP and FTP-SSL.
FYI
-Bulent
The text was updated successfully, but these errors were encountered: