Hi everyone,
I have "read timeout" issue that I need help with. I am writing an application that downloads a file from a remote FTP server (in this case vsftpd) and then unzips it locally. I am getting a "Read timed out" error. The output is as follows:
DEBUG [FTPClient] 15 Apr 2007 16:29:34.522 : Class: com.enterprisedt.net.ftp.FTPClient
Version: 1.5.4
Build timestamp: 16-Jan-2007 09:05:59 EST
Java version: 1.5.0_06
CLASSPATH: /home/sshirley/development/Projekte/WuH/KonfexTransport:/home/sshirley/development/libraries/java/edtftpj-1.5.4/edtftpj-1.5.4.jar
OS name: Linux
OS arch: amd64
OS version: 2.6.15-28-amd64-generic
DEBUG [FTPClient] 15 Apr 2007 16:29:34.615 : Connecting to /xx.xx.xx.xx:21
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.751 : 220 Welcome to easy-set FTP service.
Connected!
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.753 : ---> USER konfexian
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.791 : 331 Please specify the password.
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.792 : ---> PASS ********
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.831 : 230 Login successful.
Logged into the server
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.831 : ---> SYST
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.870 : 215 UNIX Type: L8
We are connected to: 69.95.35.40 running on UNIX Type: L8 on port: 21
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.871 : ---> FEAT
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.907 : 211-Features:
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.908 : EPRT
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.978 : EPSV
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.978 : MDTM
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.978 : PASV
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.978 : REST STREAM
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.978 : SIZE
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.978 : TVFS
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.979 : 211 End
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:34.979 : ---> TYPE I
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:35.18 : 200 Switching to Binary mode.
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:35.18 : ---> CWD updates
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:35.57 : 250 Directory successfully changed.
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:35.57 : ---> PWD
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:35.87 : 257 "/updates"
Currently in dir: /updates
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:35.88 : ---> PASV
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:35.117 : 227 Entering Passive Mode (xx,xx,xx,xx,154,77)
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:35.163 : ---> RETR konfex_20-03-2007.zip
DEBUG [FTPControlSocket] 15 Apr 2007 16:29:35.198 : 150 Opening BINARY mode data connection for konfex_20-03-2007.zip (104930597 bytes).
java.net.SocketTimeoutException: Read timed out
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:411)
at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
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: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.get(FTPClient.java:1857)
at com.whcorp.sshirley.KonfexTransport.main(KonfexTransport.java:77)
I know from using another FTP program (gFTP) that FTP works from my machine (Ubuntu Linux 6.01 amd64 laptop on a wireless connection). So it has to be something that I am not doing right in my code. As you can see from the features list above, the server doesn't support active mode. I've tried switching to active and doesn't help. Could it have to do with my JVM and ports?
-Sam