Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.1k views
in Java FTP by (200 points)
Hi guys,

I am using FTPClient in edtftpj-1.5.3.jar.
the ftp client is deployed on windows(jre 1.4.2) and the ftp server is deployed on aix-unix (using proftpd 1.3.0).
we got following error message sometimes:
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at com.enterprisedt.net.ftp.FTPControlSocket.readReply(FTPControlSocket.java:753)
at com.enterprisedt.net.ftp.FTPClient.validateTransfer(FTPClient.java:1350)
at com.enterprisedt.net.ftp.FTPClient.validateTransferOnError(FTPClient.java:1375)
at com.enterprisedt.net.ftp.FTPClient.get(FTPClient.java:1655)

the error happens imediately after dowloading start, it seems no timeout here (even we set the timeout to be 30000 millseconds).

I wonder how this happen? it's the problem of client side, network or ftp server?

thanks in advance.

Regards,

pingzi

1 Answer

0 votes
by (200 points)
I check the folllowing source code:

public void get(String localPath, String remoteFile)
throws IOException, FTPException {

FTPTransferType currentType = transferType;
chooseTransferMode(remoteFile);
try {
getData(localPath, remoteFile);
validateTransfer();
}
catch (IOException ex) {
validateTransferOnError();
throw ex;
}
finally {
transferType = currentType;
}
}

it seems IOException happens and it's catched. it will validateTransferOnError() first and then throw the exception.

but in the method validateTransferOnError, it throw another exception.

anyone has some idea?

Categories

...