Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4.2k views
in Java FTP by (240 points)
I'm doing initial integration with the ftp client and am getting a SocketTimeoutException almost immediately (< 1sec) when trying to get a file. This happens every time, but everything else seems to work fine. Any ideas?

-Duke

Here's the log output:

DEBUG [com.enterprisedt.net.ftp.pro.ProFTPClient] 28 Nov 2006 10:14:43.335 : Connecting to localhost/127.0.0.1:21
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.344 : 220 localhost FTP server (tnftpd 20040810) ready.
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.345 : ---> USER duke
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.346 : 331 Password required for duke.
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.346 : ---> PASS ********
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.372 : 230-
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.372 : Welcome to Darwin!
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.372 : 230 User duke logged in.
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.373 : ---> TYPE I
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.374 : 200 Type set to I.
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.378 : ---> CWD esession/source/trunk/site
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.378 : 250 CWD command successful.
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.378 : ---> PWD
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.379 : 257 "/Users/duke/eSession/source/trunk/site" is the current directory.
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.379 : ---> SIZE users/projects/1/1/77_07 Off to Work-short copy.mp3
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.380 : 213 254135
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.380 : ---> PORT 127,0,0,1,245,131
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.380 : 200 PORT command successful.
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.380 : ---> RETR users/projects/1/1/77_07 Off to Work-short copy.mp3
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.383 : 150 Opening BINARY mode data connection for 'users/projects/1/1/77_07 Off to Work-short copy.mp3' (254135 bytes).
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$CharsetSD.readBytes(StreamDecoder.java:408)
at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:450)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
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.D(Unknown Source)
at com.enterprisedt.net.ftp.FTPClient.validateTransfer(Unknown Source)
at com.enterprisedt.net.ftp.FTPClient.B(Unknown Source)
at com.enterprisedt.net.ftp.FTPClient.get(Unknown Source)
at com.esession.core.FTPClientController$1.run(Unknown Source)
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$CharsetSD.readBytes(StreamDecoder.java:408)
at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:450)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
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.D(Unknown Source)
at com.enterprisedt.net.ftp.FTPClient.validateTransfer(Unknown Source)
at com.enterprisedt.net.ftp.FTPClient.B(Unknown Source)
at com.enterprisedt.net.ftp.FTPClient.get(Unknown Source)
at com.esession.core.FTPClientController$1.run(Unknown Source)
DEBUG [FTPControlSocket] 28 Nov 2006 10:14:43.886 : ---> QUIT
DEBUG [FTPControlSocket] 28 Nov 2006 10:17:12.788 : 421 Timeout (900 seconds): closing control connection.
Nov 28, 2006 10:17:12 AM com.esession.core.FTPClientController finishUp
SEVERE: FTPClientController: could not quit.
[list][/list][list][/list]

5 Answers

0 votes
by (240 points)
Works connecting to a different server.
0 votes
by (240 points)
on the server it was working on. Same error, same place, pointing at two different servers.
0 votes
by (162k points)
You might be better off navigating to the directory the file is in & then trying to download it. Some servers have problems coping with paths. Worth a try.
0 votes
by (240 points)
Tried navigating to the directory and then just downloading the file, but got the same error.
0 votes
by (162k points)
Have you explicitly set the timeout?

Categories

...