錯誤一: 服務器
@ERROR: auth failed on module xxxxx 網絡
rsync: connection unexpectedly closed (90 bytes read so far) socket
rsync error: error in rsync protocol data stream (code 12) at io.c(150) tcp
解決:這是由於密碼設置錯了,沒法登入成功,檢查一下rsync.pwd,看客戶端和服務器是否匹配。還有服務器端沒啓動rsync 服務也會出現這種狀況。 ui
錯誤二:.net
@ERROR: auth failed on module rsynccode
rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]server
解決:服務器端密碼設定錯誤,客戶端沒法登入到服務器。服務器端的密碼應該以user:password的形式存放明文密碼,而客戶端的密碼只須要以password的明文形式保存。get
錯誤三: 同步
password file must not be other-accessible
continuing without password file
Password:
解決:這是由於rsyncd.pwd rsyncd.sec的權限不對,應該設置爲600。如:chmod 600 rsyncd.pwd
錯誤四:
@ERROR: chroot failed
rsync: connection unexpectedly closed (75 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(150)
解決:這是由於你在 rsync.conf 中設置的 path 路徑不存在,要新建目錄才能開啓同步。
錯誤五:
rsync: failed to connect to 218.107.243.2: No route to host (113)
rsync error: error in socket IO (code 10) at clientserver.c(104) [receiver=2.6.9]
解決:對方沒開機、防火牆阻擋、經過的網絡上有防火牆阻擋,都有可能。關閉防火牆,其實就是把tcp udp 的873端口打開。
錯誤六:
錯誤信息:服務器端已經過secrets file指定了密碼文件爲/etc/rsyncd.secrets,服務器端但願客戶端經過設定的密碼推送或者拉取文件,但實際上客戶端不準要密碼也能夠從服務器段推送或者拉取文件。
解決:secrets file中設定的明文密碼文件,只有在該模塊中auth users被定義時才起做用。
錯誤七:
[root@Real6410 /mnt]# rsync -avzP --password-file=/etc/rsyncd.pwd rsync 10.10.10.100::rsync
@ERROR: invalid gid nobody
rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]
解決:通常指定的gid爲nobody,但錯誤提示明確指出gid=nobody是非法的,將nobody改成root後,問題解決。
(至於可否改爲其餘gid,我這裏的實驗結果都不成功,將目標板中/etc目錄下的group和passwd添加新的gid=hxtc,同時服務器端的rsyncd.secrets的用戶也改爲hxtc:password,同時服務器端的rsyncd.conf中rsync模塊下的uid,gid和auth users都設爲hxtc,仍然不能成功。)