Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.2k views
in Java FTP by (160 points)
Does anybody know what I can do about a java.net.SocketTimeoutException when I'm calling the FTPClient.put method? It's happening pretty consistently with some of my clients, and my hosting service claims that the problem isn't on their end. Thanks,

Jay

2 Answers

0 votes
by (160 points)
P.S. Here's the stack trace, in case that helps:

java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at java.io.BufferedReader.fill(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at com.enterprisedt.net.ftp.FTPControlSocket.readReply(FTPControlSocket.java:783)
at com.enterprisedt.net.ftp.FTPClient.validateTransfer(FTPClient.java:1503)
at com.enterprisedt.net.ftp.FTPClient.validateTransferOnError(FTPClient.java:1528)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:1483)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:1465)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:1443)
at FTA.UploadZipFile(FTA.java:857)
at FTA.DoUpload(FTA.java:517)
at FTA$5.run(FTA.java:1220)
at java.security.AccessController.doPrivileged(Native Method)
at FTA.run(FTA.java:1216)
at java.lang.Thread.run(Unknown Source)
0 votes
by (162k points)
Possibly a problem with your firewall. Try switching between transfer modes (active and passive) and also test with ftp.exe.

Categories

...