commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <>
Subject Re: [NET] FTP logout() timeout
Date Sun, 17 Apr 2005 02:36:34 GMT

In message <DA5E76C21FEA85459B0E959CFAC23782057A6FC4@sisexpo01.sis>, "Whitlock,
 Jeremy x66075" writes:
>Now I get the FTPConnectionClosedException because the connection is
>forcefully closed due to the FTP session timing out.  Did I implement =
>wrong or is there more to my problem?  Thanks, Jeremy

Again, sorry if I'm late chiming because of digest lag.  Is XMLOutputter
closing the OutputStream after it's done?  If not, then close it yourself
before calling completePendingCommand.  Is there a firewall between you
and the FTP server?  If so, you'll have to use passive mode.  Try
storing a file using the example in src/java/example/
using the -s and -b options.  If that works, then the problem is probably
somewhere in your code.  If it doesn't work, then the problem is probably
somewhere in FTPClient.

Also,you may want to check the reply code after calling
storeFileStream a la example in the completePendingCommand javadocs:
if(!FTPReply.isPositiveIntermediate(ftp.getReplyCode())) {
If the server is returning something other than a positive intermediate
reply code (300-399) then maybe the server didn't like the store command
FTPClient sent it.  I say that because you said you didn't have any
problems using a command line client.

At any rate, trying the example program should help narrow
down where the problem is happening.  It will print out the FTP
protocol conversation using the PrintCommandListener example class.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message