Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.4k views
in Java FTP by (120 points)
We have to transfer files over a connection that is not very stable. I'm trying to use the resume functionality when the connection to the server goes down. Right now I'm testing to see if it works by bringing down the FTP server on my machine. When a connection is broken, I reconnect to the server and try to resume the download of the file. But everytime I try to use FTPClient.resume followed by a get it just seems to start downloading the file from the start. This is the output in verbose mode,
Start downloader thread
Calling ftpConnect
INFO [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 5 sep 2006 14:15:35.67 : edtFTPj - PRO version
DEBUG [com.enterprisedt.net.ftp.FTPClient] 5 sep 2006 14:15:35.67 : Class: com.enterprisedt.net.ftp.ssl.SSLFTPClient
Version: 1.2.7
Build timestamp: 21-Mar-2006 19:01:35 GMT
Java version: 1.4.2_11
CLASSPATH: C:\subversion\bin;C:\subversion\dev\lib\activation.jar;C:\subversion\dev\lib\ant-contrib.jar;
C:\subversion\dev\lib\antform.jar;C:\subversion\dev\lib\edtftpj-pro.jar;C:\subversion\dev\lib\license.jar;
C:\subversion\dev\lib\log4j-1.2.13.jar;C:\subversion\dev\lib\mgmt_client.jar;C:\subversion\dev\lib\sonic_Client.jar;
C:\subversion\dev\lib\xq_core.jar;C:\subversion\dev\lib\mail.jar;C:\subversion\dev\delivery\SonicFS\HM_lib\HM_XQServices.jar
OS name: Windows XP
OS arch: x86
OS version: 5.1

INFO [com.enterprisedt.util.license.LicenseProperties] 5 sep 2006 14:15:35.67 : Licence expiry date: 31 dec 2099
INFO [com.enterprisedt.util.license.LicenseProperties] 5 sep 2006 14:15:35.67 : Production licence
INFO [puretls] 5 sep 2006 14:15:35.208 : PureTLS debug level=0
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 5 sep 2006 14:15:35.208 : Setting custom validator to com.enterprisedt.net.ftp.ssl.SSLFTPStandardValidator
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 5 sep 2006 14:15:35.224 : Created explicit FTPS client.
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 5 sep 2006 14:15:35.224 : Connecting to localhost/127.0.0.1:21
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : 220-FileZilla Server version 0.9.18 beta
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : 220-written by Tim Kosse (Tim.Kosse@gmx.de)
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : 220 Please visit http://sourceforge.net/projects/filezilla/
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : DISABLE_CONTROL_SSL_CLOSURE=false
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : DISABLE_CONTROL_WAIT_ON_CLOSE=true
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : ALLOW_BASIC_CONSTRAINTS_IN_NON_CA=false
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : ---> USER hm
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : 331 Password required for hm
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : ---> PASS ********
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : 230 Logged on
Get file listing
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : ---> PASV
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : 227 Entering Passive Mode (127,0,0,1,4,153)
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : Substituting server supplied IP (127.0.0.1) with remote host IP (127.0.0.1)
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : Creating FTPPassiveDataSocket
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : ---> NLST
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : 150 Connection accepted
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : 226 Transfer OK
Get listing for large_file.dat
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : ---> PASV
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : 227 Entering Passive Mode (127,0,0,1,4,155)
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : Substituting server supplied IP (127.0.0.1) with remote host IP (127.0.0.1)
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.255 : Creating FTPPassiveDataSocket
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.271 : ---> LIST large_file.dat
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.271 : 150 Connection accepted
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.271 : 226 Transfer OK
Found file...
Setting transfer type to BINARY
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.286 : ---> TYPE I
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.286 : 200 Type set to I
Downloading file large_file.dat
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.286 : ---> PASV
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.286 : 227 Entering Passive Mode (127,0,0,1,4,157)
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.286 : Substituting server supplied IP (127.0.0.1) with remote host IP (127.0.0.1)
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.286 : Creating FTPPassiveDataSocket
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.286 : ---> RETR large_file.dat
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:35.302 : 150 Connection accepted
DEBUG [com.enterprisedt.net.ftp.FTPClient] 5 sep 2006 14:15:37.770 : Transferred 146374656 bytes from remote host
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:37.770 : 421 Server is going offline
com.enterprisedt.net.ftp.FTPException caught while downloading: Server is going offline
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:15:37.770 : ---> QUIT
Exeption while disconnecting Software caused connection abort: recv failed

Calling ftpConnect
DEBUG [com.enterprisedt.net.ftp.FTPClient] 5 sep 2006 14:16:06.567 : Class: com.enterprisedt.net.ftp.ssl.SSLFTPClient
Version: 1.2.7
Build timestamp: 21-Mar-2006 19:01:35 GMT
Java version: 1.4.2_11
CLASSPATH: C:\subversion\bin;C:\subversion\dev\lib\activation.jar;C:\subversion\dev\lib\ant-contrib.jar;C:\subversion\dev\lib\antform.jar;
C:\subversion\dev\lib\edtftpj-pro.jar;C:\subversion\dev\lib\license.jar;C:\subversion\dev\lib\log4j-1.2.13.jar;
C:\subversion\dev\lib\mgmt_client.jar;C:\subversion\dev\lib\sonic_Client.jar;C:\subversion\dev\lib\xq_core.jar;
C:\subversion\dev\lib\mail.jar;C:\subversion\dev\delivery\SonicFS\HM_lib\HM_XQServices.jar
OS name: Windows XP
OS arch: x86
OS version: 5.1

INFO [com.enterprisedt.util.license.LicenseProperties] 5 sep 2006 14:16:06.567 : Licence expiry date: 31 dec 2099
INFO [com.enterprisedt.util.license.LicenseProperties] 5 sep 2006 14:16:06.567 : Production licence
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 5 sep 2006 14:16:06.567 : Setting custom validator to com.enterprisedt.net.ftp.ssl.SSLFTPStandardValidator
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 5 sep 2006 14:16:06.567 : Created explicit FTPS client.
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 5 sep 2006 14:16:06.567 : Connecting to localhost/127.0.0.1:21
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 5 sep 2006 14:16:06.567 : 220-FileZilla Server version 0.9.18 beta
DEBUG &#91

Please log in or register to answer this question.

Categories

...