我尝试从服务器rsync以下命令,并收到以下错误消息:
rsync -e ssh -avz name@home.com:/home/name/. .
receiving file list ... done
Desktop/Python_Nick/Python-2.4.1/
Desktop/Python_Nick/Python-2.4.1/Python/
Write failed: Broken pipe
rsync: writefd_unbuffered failed to write 4092 bytes [generator]: Broken pipe (32)
rsync error: unexplained error (code 255) at /SourceCache/rsync/rsync-42/rsync/io.c(1121) [generator=2.6.9]
rsync error: received SIGUSR1 (code 19) at /SourceCache/rsync/rsync-42/rsync/main.c(1197) [receiver=2.6.9]
Run Code Online (Sandbox Code Playgroud)
有时会出现以下错误:
Read from socket failed: Operation timed out
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: unexplained error (code 255) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [receiver=2.6.9]
Run Code Online (Sandbox Code Playgroud)
然后有时会出现以下错误:
Write failed: Broken pipe
rsync: connection unexpectedly closed (314764 bytes received so far) [receiver]rsync: writefd_unbuffered failed to write 4092 bytes [generator]: Broken pipe (32)
rsync error: unexplained error (code 255) at /SourceCache/rsync/rsync-42/rsync/io.c(1121) [generator=2.6.9]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [receiver=2.6.9]
Run Code Online (Sandbox Code Playgroud)
我甚至尝试过使用FETCH(MAC应用程序).
有什么建议?服务器正在运行LINUX,我的本地机器是MAC
小智 1
我遇到了类似的问题,我的解决方案是更新我的 Mac 上的 rsync。
从rsync“当前问题和调试”页面中的第 3 点可以清楚地看出,“连接意外关闭”
错误告诉您本地 rsync 正在尝试与远程 rsync 通信,但与该 rsync 的连接现已消失。您必须弄清楚原因,这可能涉及一些调查工作。
此页面上建议的第一件事就是更新 rsync。事实证明,Apple 并没有在他们的机器上为我们提供最新的 rsync。因此,我通过 Macports 将 Mac 上的 rsync 版本更新到 3.1.1。之后,我的同步就没有问题了。
当然,这不是通用的解决方案,但是对于这个模糊的错误消息似乎没有通用的解决方案:如果这不起作用,我必须尝试并调试它。有关如何操作的详细信息,请参阅上述 rsync 问题页面。