rsync使用時的常見問題:
錯誤1: rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at io.c(794) [receiver=3.0.2]
解決:很大多是服務器端沒有開啓 rsync 服務。開啓服務。 或者開啓了防火牆指定的端口沒法訪問。
錯誤2:@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1495) [receiver=3.0.2]
解決:服務器端同步目錄沒有權限,cwrsync默認用戶是Svcwrsync。爲同步目錄添加用戶Svcwrsync權限。
錯誤3:@ERROR: failed to open lock file
rsync error: error starting client-server protocol (code 5) at main.c(1495) [receiver=3.0.2]
解決:服務器端配置文件 rsyncd.conf中添加 lock file = rsyncd.lock 便可解決。
錯誤4:@ERROR: invalid uid nobody
rsync error: error starting client-server protocol (code 5) at main.c(1506) [Receiver=3.0.2]
解決:在rsyncd.conf文件中添加下面兩行便可解決問題
UID = 0
GID = 0
錯誤5:@ERROR: auth failed on module test2
rsync error: error starting client-server protocol (code 5) at main.c(1296) [receiver=3.0.2]
解決:服務端沒有指定正確的secrets file,請在 [test2]配置段添加以下配置行:
auth users = coldstar #同步使用的賬號
secrets file = rsyncd.secrets #密碼文件
錯誤6:password file must not be other-accessible
解決:客戶端的pass文件要求權限爲600, chmod 600 /etc/rsync.pass 便可。
錯誤7:rsync: chdir /cygdrive/c/work failed
: No such file or directory (2)服務器
解決:服務器端同步文件夾路徑或名稱寫錯了,檢查path。性能
===============================================================ui
rsyncserver 服務啓動時報錯「rsyncserver服務啓動後又中止了。一些服務自動中止,若是它們沒有什麼可作的,例如「性能日誌和警報」服務。」日誌
解決方法:將安裝目錄下的rsyncd.pid文件刪除,再從新啓動RsyncServer服務。通常是異常關機致使的。code