[Fwd: Apache as a Rsync HTTP proxy]

John Van Essen vanes002 at umn.edu
Tue Dec 20 10:30:42 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



More information about the rsync mailing list