[Fwd: Apache as a Rsync HTTP proxy]

Vincent Blondel vincent at xtra-net.org
Tue Dec 20 12:49:26 GMT 2005


>> Subject: Apache as a Rsync HTTP proxy
>> From:    "Vincent Blondel" <vincent at xtra-net.org>
>> Date:    Mon, December 19, 2005 18:46
>> To:      users at httpd.apache.org
>>
>> Hi all,
>>
>> Recently I had to set-up our external http proxy (apache 1.3.x)
>> in such a way that it accepts rsync traffic coming from our lan.
>>
>> So I decided to add a 'CONNECT' in my httpd.conf. This is all
>> working now but not so fine as I could expect it. Sometimes
>> the communication is broken and I get this error message coming
>> from rsync :
>>
>>  ...
>>  rsync: connection unexpectedly closed ... [receiver]
>>  rsync error: error in rsync protocol data stream (code 12) at io.c(443)
>>  rsync: connection unexpectedly closed ... [generator]
>>  rsync error: error in rsync protocol data stream (code 12) at io.c(443)
>>  ...
>>
>> I give you below my current config.
> [ snip ]
>
> So - you have a server(daemon) being proxied through Apache and you
> are fetching files from that server?
>
> It looks like Apache closes the connections before the rsync client
> expects it.  But only sometimes?
>
> Do the files always get transferred reliably and this problem crops
> up right at the end?   This could be the cause:
>
>   http://httpd.apache.org/docs/1.3/mod/mod_proxy.html#proxyiobuffersize
>
>     "When a response is received which fits entirely within the IO
>     buffer size, the remote HTTP or FTP server socket will be closed
>     before an attempt is made to write the response to the client.
>     This ensures that the remote server does not remain connected
>     unnecessarily while the response is delivered to a slow client."
>
> I think rsync may be picky about when connections get closed.
>
> If that doesn't help - please provide more info, like version of rsync,
> command used, time it takes after the start of the rsync for the error
> to appear, etc.
>
>     John
>
>

So, to be very clear, I get a server (in my LAN) that synchronizes a website (on the net) twice an hour with the rsync
utility. My web server is located in a vlan that doesn't have any access on the internet.

So the server access the internet through an HTTP proxy ( apache 1.3.X ) with rsync 2.6.6.

    Rsync Server
        ^
        |
     internet
        ^
        |
     router
        ^
        |
   Apache HTTP proxy
        ^
        |
  Server (Rsync client)

When you have a look at my httpd config, I am also using ProxyReceiveBufferSize with value 2048 and ProxyIOBufferSize with
value 131072 but the problem is always happening.

Each time, rsync starts, the connection breaks a few seconds after it receives the files list and at the end of the day I
get 50 rsync idle processes. I get exacly the same situation on the HTTP proxy that gets 50 idle processes waiting an
answer from the rsync processes.

Do you get some info for me ???

Regards
Vincent.



More information about the rsync mailing list