2015-12-26 74 views
2

出於藍,在vagrant up,rsync的開始拋出下面的錯誤:rsync的不明原因的錯誤(代碼255)(820)

There was an error when attempting to rsync a synced folder. 
Please inspect the error message below for more info. 

Host path: /c/Users/David/Sandbox/citypantry/frontend/ 
Guest path: /home/citypantry/project/frontend 
Command: rsync --verbose --archive -z --copy-links --chmod=ugo=rwX --no-perms --no-owner --no-group --rsync-path sudo rsync -e ssh -p 2222 -o ControlMaster=auto -o ControlPath=C:/bin/cygwin64/tmp/ssh.588 -o ControlPersist=10m -o StrictHostKeyChecking=no -o IdentitiesOnly=true -o UserKnownHostsFile=/dev/null -i 'C:/Users/David/Sandbox/citypantry/vagrant/.vagrant/machines/default/virtualbox/private_key' --exclude .vagrant/ --exclude app/cache/ --exclude app/logs/ --exclude node_modules /c/Users/David/Sandbox/citypantry/frontend/ [email protected]:/home/citypantry/project/frontend 
Error: Warning: Permanently added '[127.0.0.1]:2222' (ECDSA) to the list of known hosts. 
select: Interrupted system call 
rsync: [sender] write error: Broken pipe (32) 
rsync error: unexplained error (code 255) at io.c(820) [sender=3.1.1] 

這是由於Windows 10運行一個cygwin(64)與ConEmu上的rsync 3.1.1(x64)。我所知道的沒有任何東西在系統中發生了變化,並且同步已經運行了數週,沒有任何問題。

這個錯誤是什麼意思,我該如何解決?

+0

我認爲這是[超級用戶](http://superuser.com/about)的更多問題。 – Jakuje

回答

0

看起來像流浪漢1.8.0問題:https://github.com/mitchellh/vagrant/issues/6702

更新應該解決的問題。如果不能,則解決方法是編輯$VAGRANT_HOME\embedded\gems\gems\vagrant-1.8.0\plugins\synced_folders\rsync\helper.rb和刪除線77〜79:

"-o ControlMaster=auto " + 
"-o ControlPath=#{controlpath} " + 
"-o ControlPersist=10m " + 
0

當你點擊連接超時的管道中斷錯誤通常發生。在計算遠程文件差異時它可能發生在rsync上,並且它沒有及時響應客戶端。

爲了避免這種情況,嘗試增加服務器活動的間隔在你的SSH配置值(~/.ssh/config):

Host * 
    ServerAliveInterval 30 
    ServerAliveCountMax 6 

也可以考慮做遙控器上的相似(在/etc/ssh/sshd_config),例如

ClientAliveInterval 30 
ClientAliveCountMax 6 

參見:What the options ServerAliveInterval and ClientAliveInterval mean?


或者添加以下永葆線到您的Vagrantfile

config.vm.ssh.keep_alive = true 

如果你認爲這是一個控制主的問題,近期流浪版本ignore to use it on windows platforms