Windows 上的 Rsync - 非套接字上的套接字操作
当我尝试在 Windows XP SP2 中运行最新的 Cygwin 版本的 rsync 时,出现以下错误。 尝试本地同步(即:仅本地硬盘上的源和目标)和远程同步(使用 openssh 包中的“-e ssh”)时会发生错误。 关于如何修复/解决它有什么建议吗?
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]
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]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可能有什么东西阻止了 rsync。 就我而言,它是 NOD32 防病毒软件。 您可以通过在“gdb”中运行 rsync 来检查这一点,如下所示:
注意 gdb 启动后的“run”命令。 您将看到如下输出:
因此,您必须将 rsync 添加到该病毒扫描程序 (NOD32) 的排除列表中:
c:\cygwin\bin\rsync.exe
You probably have something blocking rsync. In my case it's NOD32 antivirus. You can check this by running rsync in 'gdb' as follows:
note the "run" command after gdb has started. You will see some output like this:
So you will have to add rsync to your exclude list in that virus scanner (NOD32):
c:\cygwin\bin\rsync.exe
请注意,如果通过 SSH 连接使用 rsync,Cygwin 中长期存在的管道实现错误会导致 rsync 挂起。
从 Cygwin v. 1.7 开始,使用 rsync 传输大量数据的唯一可靠方法似乎是使用 rsync 协议连接到 rsync 守护进程。 DeltaCopy 只是这个方法的一个漂亮的包装。
一些用户显然已经成功地通过 SSH 将数据从 Windows 推送到 Unix,而不是从 Windows 拉取 Unix 端的数据。 但根据我们的经验,这也是不可靠的。
Google 搜索 cygwin、rsync、ssh 和 pipeline/hang/stall,您会找到有关此问题的更多信息。
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.
并不是您问题的真正答案,但我发现 Delta Copy 是一个比摆弄 Cygwin 更好的选择。 它也连接到常规 rsync 守护进程。
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.
我发现这是一个 winsock 错误。 我确认问题是由于为 Sierra Wireless Aircard (875U) 安装 ATT 通信管理器(版本 6.12.0046.0)而开始的。 卸载 Communications Manager,rsync 错误就会消失。
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.
遵循@akaihola的建议后,我发现 这篇博客文章提供了相同问题的解决方案。
我在这里发布了解决方案,但版权归 Marc Abramowitz
当然,您需要带有 rsync 的 Cygwin。
After following @akaihola ’s advice I found this blog post with the solution to the same problem.
I post the solution here, but the credits go to Marc Abramowitz
Of course you need Cygwin with rsync.