commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: FTPClient hangs when downloading large files
Date Wed, 23 Mar 2011 19:27:33 GMT
On 23 March 2011 05:06, Cysneros, Nelson A CIV SPAWARSYSCEN-PACIFIC,
56540 <nelson.cysneros@navy.mil> wrote:
> Thank you!!! By putting in a time out I was able to catch the Exception and recover.
>
> The FTP server is maintained off site, I asked them about the FTP server software they
are using and if we can get a "Read Only" account set up for you but I have not heard back
from them.
> I'll pass along the info, when I get it.

Thanks.

> Thanks again for your advice.  Everything is working as expected now.

OK, thanks for updating us.

>
>
> -----Original Message-----
> From: sebb [mailto:sebbaz@gmail.com]
> Sent: Monday, March 21, 2011 11:17 AM
> To: Commons Users List
> Subject: Re: FTPClient hangs when downloading large files
>
> On 21 March 2011 16:24, Cysneros, Nelson A CIV SPAWARSYSCEN-PACIFIC, 56540 <nelson.cysneros@navy.mil>
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 finished.
>
> [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: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message