I get the error condition when I ran it against an Ipswitch WS_FTP Server. This happens for both FTP and FTPS. For the plain FTP version of my program, I get the error messages shown above. The FTPS version of my program get stucked when trying to send the "delete" command:
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 18 Oct 2004 16:29:28.415 : Connecting to localhost/127.0.0.1:21
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:28.565 : 220-localhost X2 WS_FTP Server 5.0.2.EVAL (62395827)
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:28.565 : 220-Mon Oct 18 16:29:28 2004
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:28.575 : 220 localhost X2 WS_FTP Server 5.0.2.EVAL (62395827)
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:28.585 : ---> AUTH SSL
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:29.86 : 234 SSL enabled and waiting for negotiation
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:29.86 : Starting SSL handshake on control socket
INFO [puretls] 18 Oct 2004 16:29:29.727 : PureTLS debug level=0
INFO [cryptix] 18 Oct 2004 16:29:30.27 : GLOBAL_TRACE=false
INFO [cryptix] 18 Oct 2004 16:29:30.27 : GLOBAL_DEBUG=false
INFO [cryptix] 18 Oct 2004 16:29:30.27 : GLOBAL_DEBUG_SLOW=false
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.498 : SSL handshake on control socket complete
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.498 : ---> PBSZ 0
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.508 : 200 PBSZ=0
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.508 : ---> PROT P
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.508 : 200 PRIVATE data channel protection level set
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.508 : ---> USER datstat
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.518 : 331 Password required
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.518 : ---> PASS ********
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.518 : 230 user logged in
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.518 : ---> PBSZ 0
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.558 : 200 PBSZ=0
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.558 : ---> PROT P
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.568 : 200 PRIVATE data channel protection level set
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.568 : ---> CWD TEST-FTPS/flatfiles
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.568 : 250 CWD successful
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.588 : ---> SYST
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.598 : 215 UNIX
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.648 : ---> PASV
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.648 : 227 Entering Passive Mode (127,0,0,1,8,118).
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.648 : Creating SSLFTPPassiveDataSocket
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.668 : ---> LIST
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.668 : 150 Opening ASCII data connection for directory listing
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPPassiveDataSocket] 18 Oct 2004 16:29:30.678 : Starting SSL handshake on passive data socket
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPPassiveDataSocket] 18 Oct 2004 16:29:30.828 : SSL handshake on passive data socket complete
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPPassiveDataSocket] 18 Oct 2004 16:29:30.838 : Closing socket on control socket
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.949 : 226 transfer complete
[.]
[..]
Armored.txt
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.959 : ---> TYPE I
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.959 : 200 Type set to IMAGE.
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.959 : ---> PASV
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.969 : 227 Entering Passive Mode (127,0,0,1,8,120).
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.969 : Creating SSLFTPPassiveDataSocket
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.979 : ---> RETR Armored.txt
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:30.979 : 150 Opening BINARY data connection for Armored.txt (148069 bytes)
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPPassiveDataSocket] 18 Oct 2004 16:29:30.979 : Starting SSL handshake on passive data socket
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPPassiveDataSocket] 18 Oct 2004 16:29:31.109 : SSL handshake on passive data socket complete
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPPassiveDataSocket] 18 Oct 2004 16:29:31.359 : Closing socket on control socket
DEBUG [com.enterprisedt.net.ftp.FTPClient] 18 Oct 2004 16:29:31.369 : Transferred 148069 bytes from remote host
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:31.469 : 226 transfer complete
Trying to delete file Armored.txt
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 18 Oct 2004 16:29:31.469 : ---> DELE Armored.txt
For the SSL verion, I used these flags:
ftp = new SSLFTPClient("localhost",
SSLFTPClient.ConfigFlags.DISABLE_SSL_CLOSURE
| SSLFTPClient.ConfigFlags.DISABLE_WAIT_ON_CLOSE
| SSLFTPClient.ConfigFlags.DISABLE_CONTROL_SSL_CLOSURE
| SSLFTPClient.ConfigFlags.DISABLE_CONTROL_WAIT_ON_CLOSE
| SSLFTPClient.ConfigFlags.DISABLE_DATA_SSL_CLOSURE
| SSLFTPClient.ConfigFlags.DISABLE_DATA_WAIT_ON_CLOSE);
However, when I ran the plain FTP version of my program against another server, everything worked just fine. I'm not sure if this is specific to the WS_FTP server I'm running, or if this is something else.
Thanks for your help.
What server are you running against? Is this using edtFTPj/SSL, via FTPS? Does this happen with plain FTP?
If you are using edtFTPj/SSL, you may want to try some of the config flag settings such as DISABLE_DATA_SSL_CLOSURE, documented in the Javadoc.