rsync on cygwin: Connection reset by peer

Jake Repp jrepp at nwlink.com
Sat Oct 20 14:04:20 EST 2001


I have been trying to get rsync running correctly on cygwin for the past
couple of days. I found a post on the cygwin list that said there was a
bug in cygwin when using socketpair() but when I compiled the sample code:
(http://jrepp.com/rsync/socketpair.c) both ways it works fine. Here's the
article for reference:
http://sources.redhat.com/ml/cygwin/2001-08/msg00357.html

I am running the latest update from cvs

Here's what happens when I try to get a module list from the cgywin
system from a freebsd4.4 system: http://jrepp.com/rsync/packetlog.txt

fisher          "Fisher Replicated Directory"
rsync: read error: Connection reset by peer
rsync error: error in rsync protocol data stream (code 12) at io.c(151)

read_timeout is calling die_from_error with errno == 104

when going from cygwin to cygwin (uname: CYGWIN_NT-5.0 IGXDEV21
1.3.3(0.46/3/2) 2001-09-12 23:54 i686 unknown)

I get just:
rsync: read error: Connection reset by peer
rsync error: error in rsync protocol data stream (code 12) at io.c(151)

I have tried compiling with and without -DSOCKET_PAIR with the same
results.

On a side note here is a simple patch to help when running rsync as
a service, this patch doesn't fix or cause the error (the error exists
before this patch)

 Index: socket.c
===================================================================
RCS file: /cvsroot/rsync/socket.c,v
retrieving revision 1.36
diff -r1.36 socket.c
443a444,452
> #ifndef __CYGWIN__
>       /* jrepp: This causes problems when using rsync
>       under srvany.exe as a service, srvany loses
>       track of rsync.exe because it kills it's original
>       process. This doesn't hurt seem to hurt when running
>       it straight from the cmdline either.
>
>       TODO: should this be a autoconf macro (to cover MsDev in future as
well)?
>       */
446a456
> #endif /* __CYGWIN__ */

I'm going to keep trying to fix this of course but if anyone else has a
quick patch or any suggestions they would be most appreciated.

-jake





More information about the rsync mailing list