views:

1295

answers:

5

I get the following error when trying to run the latest Cygwin version of rsync in Windows XP SP2. The error occurs for attempts at both local syncs (that is: source and destination on the local harddisk only) and remote syncs (using "-e ssh" from the openssh package). Any advice on how to fix/workaround it?

bash-3.2$ rsync -a dir1 dir2
rsync: Failed to dup/close: Socket operation on non-socket (108)
rsync error: error in IPC code (code 14) at /home/lapo/packaging/tmp/rsync-2.6.9/pipe.c(143) [receiver=2.6.9]
rsync: read error: Connection reset by peer (104)
rsync error: error in IPC code (code 14) at /home/lapo/packaging/tmp/rsync-2.6.9/io.c(604) [sender=2.6.9]
A: 

Have you installed open-ssh, too?

mana
A: 

Not really an answer to your question, but I've found Delta Copy to be a much better option than messing around with Cygwin. It connects to regular rsync daemons too.

Niall
+1  A: 

Be aware that a long-standing pipe implementation bug in Cygwin causes rsync to hang if it's used through an SSH connection.

As of Cygwin v. 1.7 it seems that the only reliable way to transfer lots of data with rsync is to connect to an rsync daemon using the rsync protocol. DeltaCopy is just a pretty wrapper around this method.

Some users apparently have had success on top of SSH pushing data from Windows to Unix instead of pulling from Windows on the Unix side. In our experience that's unreliable too, though.

Google for cygwin, rsync, ssh and pipe/hang/stall and you'll find more information about this problem.

akaihola
A: 

I have found this to be a winsock error. I confirmed the problem starts with the installation of the ATT Communcations Manager (version 6.12.0046.0) for the Sierra Wireless Aircard (875U). Uninstall the Communications Manager and the rsync error goes away.

+2  A: 

You probably have something blocking rsync. In my case it's NOD32 antivirus. You can check this by running rsync in 'gdb' as follows:

$ gdb --args /usr/bin/rsync -a somedir/ anotherdir
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
.....
(no debugging symbols found)
(gdb) run 

note the "run" command after gdb has started. You will see some output like this:

Starting program: /usr/bin/rsync -a somedir/ anotherdir
.....
(no debugging symbols found)
warning: NOD32 protected [MSAFD Tcpip [TCP/IP]]
warning: NOD32 protected [MSAFD Tcpip [UDP/IP]]
warning: NOD32 protected [MSAFD Tcpip [RAW/IP]]
warning: NOD32 protected [RSVP UDP Service Provider]
warning: NOD32 protected [RSVP TCP Service Provider]
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
[New thread 1508.0x720]
[New thread 1508.0xeb0]
[New thread 1508.0x54c]
rsync: Failed to dup/close: Socket operation on non-socket
(108)
rsync error: error in IPC code (code 14) at
/home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/pipe.c(147)
[receiver=3.0.4] 

So you will have to add rsync to your exclude list in that virus scanner (NOD32):

c:\cygwin\bin\rsync.exe

DH4