Discuss (FTP) and (SFTP, FTPS and SCP), our Java file transfer clients.
no avatar
User

dosh1965

Posts

1

Joined

Thu Dec 24, 2009 4:04 am

Read timeout getting a directory listing

by dosh1965 » Thu Dec 24, 2009 4:10 am

Hi!

I'm running the sample program to get a directory listing with the free java FTP client. I'm running on 64-bit Windows 7 with JDK1.6.0_17. Connection and login works but then it hangs on reading the directory contents. No problem with accessing the
ftp site using a browser as well as using python. Any help is highly appreciated.

D.

=============================
C:\edtftpj-2.0.5\examples\howto\get_a_directory_listing>run blah.com username password
INFO [GetDirectoryListing] 23 Dec 2009 10:00:27.398 : Creating FTP client
INFO [GetDirectoryListing] 23 Dec 2009 10:00:27.420 : Setting remote host
INFO [GetDirectoryListing] 23 Dec 2009 10:00:27.421 : Connecting to server blah.com
INFO [GetDirectoryListing] 23 Dec 2009 10:00:28.832 : Connected and logged in to server blah.com
INFO [GetDirectoryListing] 23 Dec 2009 10:00:28.832 : Getting current directory listing
ERROR [FTPControlSocket] 23 Dec 2009 10:02:29.781 : Read failed ('' read so far)
WARN [FTPClient] 23 Dec 2009 10:02:29.781 : Validate transfer on error failed : Read timed out
com.enterprisedt.net.ftp.ControlChannelIOException: Read timed out
at com.enterprisedt.net.ftp.FTPControlSocket.readLine(FTPControlSocket.java:1014)
at com.enterprisedt.net.ftp.FTPControlSocket.readReply(FTPControlSocket.java:1049)
at com.enterprisedt.net.ftp.FTPClient.validateTransfer(FTPClient.java:2460)
at com.enterprisedt.net.ftp.FTPClient.validateTransferOnError(FTPClient.java:2488)
at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:3506)
at com.enterprisedt.net.ftp.FTPClient.dirDetails(FTPClient.java:3424)
at com.enterprisedt.net.ftp.FileTransferClient.directoryList(FileTransferClient.java:638)
at GetDirectoryListing.main(GetDirectoryListing.java:52)


com.enterprisedt.net.ftp.ControlChannelIOException: Read timed out
at com.enterprisedt.net.ftp.FTPControlSocket.readLine(FTPControlSocket.java:1014)
at com.enterprisedt.net.ftp.FTPControlSocket.readReply(FTPControlSocket.java:1049)
at com.enterprisedt.net.ftp.FTPClient.validateTransfer(FTPClient.java:2460)
at com.enterprisedt.net.ftp.FTPClient.validateTransferOnError(FTPClient.java:2488)
at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:3506)
at com.enterprisedt.net.ftp.FTPClient.dirDetails(FTPClient.java:3424)
at com.enterprisedt.net.ftp.FileTransferClient.directoryList(FileTransferClient.java:638)
at GetDirectoryListing.main(GetDirectoryListing.java:52)
java.net.SocketTimeoutException: Accept timed out
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at com.enterprisedt.net.ftp.internal.FTPActiveDataSocket.acceptConnection(FTPActiveDataSocket.java:185)
at com.enterprisedt.net.ftp.internal.FTPActiveDataSocket.getInputStream(FTPActiveDataSocket.java:212)
at com.enterprisedt.net.ftp.FTPClient.getInputStream(FTPClient.java:3091)
at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:3495)
at com.enterprisedt.net.ftp.FTPClient.dirDetails(FTPClient.java:3424)
at com.enterprisedt.net.ftp.FileTransferClient.directoryList(FileTransferClient.java:638)
at GetDirectoryListing.main(GetDirectoryListing.java:52)
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: Read timeout getting a directory listing

by support2 » Tue Jan 12, 2010 8:40 pm

Sorry, this post slipped past us. The most likely reason is a firewall is blocking the connection. Switch from passive to active mode or vice versa, that might help.

Who is online

Users browsing this forum: No registered users and 90 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign