commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <>
Subject Re: FTPClient hangs when downloading large files
Date Mon, 21 Mar 2011 18:17:26 GMT
On 21 March 2011 16:24, Cysneros, Nelson A CIV SPAWARSYSCEN-PACIFIC,
56540 <> wrote:
> Thank you everyone for such quick responses.  I wanted to make sure I
> follow up with more info when I had it, so here is what I know:
> I'm able to download the files using Filezilla. Here is the
> command/respond stack:
> Command:        RETR
> 15MAR11WV010800011MAR15110220-P1BS-052429279010_04_P008.nitf
> Response:       150 RETR command started
> Response:       221 Goodbye - idle time exceeded
> Error:  Connection closed by server
> Response:       550 RETR failed...
> Error:  File transfer failed after transferring 302.9 MB in 3650 seconds
> Status: Starting download of
> /week0308/15MAR11WV010800011MAR15110220-P1BS-052429279010_04_P008.nitf
> Command:        PASV
> Response:       227 Entering Passive Mode (173,166,178,236,217,144).
> Command:        REST 302821425
> Response:       350 Restarting at 302821425
> Command:        RETR
> 15MAR11WV010800011MAR15110220-P1BS-052429279010_04_P008.nitf
> Response:       150 RETR command started
> Response:       226 Transfer Complete
> Status: File transfer successful, transferred 4.9 MB in 58 seconds
> It seems that the server is timing out the connection, while the file is
> still downloading. Filezilla seems to restart the download where it left
> off and continues.

What is the server software?

Seems to me the server is broken, because it should know that the
control channel won't normally be used until the data transfer is

[This is different from the keep-alive problem, which is where a
router times out a connection.]

> From the commons-net documentation, it seems that I should get an
> FTPConnectionClosedException when this happens.  I then could restart
> the download also, but I never get any exception, my application always
> hangs using the "retrieveFile" function.

No, that Exception is generated if the control channel is unexpectedly
closed, which is not the case here.

> I then tried using the "retrieveFileStream" function but that also hangs
> in the following locations.

Have you set a data timeout?

That should at least prevent the code from hanging; you may then be
able to recover.

I don't suppose it's possible to get external (read-only) access to the server?

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

View raw message