Re: [squid-users] Timeouts when using squid as an FTP proxy with FileZilla?

From: Jeremy Webber <jeremyw@dont-contact.us>
Date: Tue, 5 Sep 2006 14:25:01 +1000

On 28/08/2006, at 6:01 PM, Guido Serassio wrote:

> Hi,
>
> At 05.30 28/08/2006, Jeremy Webber wrote:
>
>> I've been trying to use our Squid server to proxy FTP traffic.
>>
>> The client is FileZilla. It is configured to use the squid server as
>> an HTTP 1.1 proxy.
>>
>> I can connect to a remote site without difficulty (yes, I have to
>> enable the CONNECT method for this). The remote site has an idle
>> timeout of 15 minutes.
>>
>> Everything works fine until I try to send a file to the remote site.
>> When sending a file (FTP STOR command) the transfer is cut at exactly
>> 15 minutes. FileZilla reports that it detected a timeout and has
>> disconnected from the server.
>>
>> If I bypass the Squid server then I can send the file (which takes
>> about 18 minutes to transmit) without difficulty.
>>
>> There doesn't appear to be a problem fetching files, only sending
>> them.
>>
>> Can anyone shed any light as to possible reasons? I've RTFM and
>> checked this mailing list archive but have drawn a blank so far. I
>> can't see anything in our squid.conf which would cause a timeout when
>> tunnelling FTP.
>>
>> Squid version is squid-2.5.STABLE5-42.47 (as distributed with SLES 9).
>
> This is a known bug fixed starting from 2.5 STABLE13:
> http://www.squid-cache.org/bugs/show_bug.cgi?id=1459
>
> You should upgrade your Squid installation to fix it.

After having the same problem with a newer version of squid
(2.6.STABLE3) I believe that I have found a different bug.

It occurs when an FTP client which has connected to the squid server
using a CONNECT method tries to put a file (FTP STOR command). NB:
this is not using the HTTP PUT method, rather it is tunnelling the FTP
traffic through the squid server.

It appears that squid times out the FTP STOR after the period given by
read_timeout in the squid.conf file. It happens that the default value
for this is the same as my test external FTP server which is what
mislead me originally.

The problem may arise because the FTP client uses the FTP data channel
for transfer and the control channel is idle for the duration of the
file transfer.

Hoping one of the squid developers can turn this into an effective bug
report.

        -jeremy

--
Jeremy Webber                                   Senior Systems Engineer
                                                    Animal Logic Pty Ltd
Phone: +61 2 9383 4837   Fax: +61 2 9383 4801   Switch: +61 2 9383 4800
Received on Mon Sep 04 2006 - 22:25:09 MDT

This archive was generated by hypermail pre-2.1.9 : Sun Oct 01 2006 - 12:00:03 MDT