rsync 常見錯誤與解決方案整理

來源:互聯網
上載者:User

我們都是通過錯誤記錄檔查看
在rsyncd.log裡面或.err檔案裡面,大家可以用記事本開啟查看。

注意windows下面我們需要給SvcwRsync使用者,管理同步目錄的所有許可權,基本上這樣就可以了

問題一:
@ERROR: chroot failed
rsync error: error starting client-server protocol (code 5) at main.c(1522) [receiver=3.0.3]

原因:
伺服器端的目錄不存在或無許可權,建立目錄並修正許可權可解決問題。

問題二:
@ERROR: auth failed on module tee
rsync error: error starting client-server protocol (code 5) at main.c(1522) [receiver=3.0.3]

原因:
伺服器端該模組(tee)需要驗證使用者名稱密碼,但用戶端沒有提供正確的使用者名稱密碼,認證失敗。
提供正確的使用者名稱密碼解決此問題。

問題三:
@ERROR: Unknown module ‘tee_nonexists'
rsync error: error starting client-server protocol (code 5) at main.c(1522) [receiver=3.0.3]

原因:
伺服器不存在指定模組。提供正確的模組名或在伺服器端修改成你要的模組以解決問題。

問題1:
在client上遇到問題:
rsync -auzv --progress --password-file=/etc/rsync.pas root@192.168.133.128::backup /home/
rsync: could not open password file "/etc/rsync.pas": No such file or directory (2)
Password:
@ERROR: auth failed on module backup
rsync error: error starting client-server protocol (code 5) at main.c(1506) [Receiver=3.0.7]
遇到這個問題:client端沒有設定/etc/rsync.pas這個檔案,而在使用rsync命令的時候,加了這個參數--
password-file=/etc/rsync.pas

問題2:
rsync -auzv --progress --password-file=/etc/rsync.pas root@192.168.133.128::backup /home/
@ERROR: auth failed on module backup
rsync error: error starting client-server protocol (code 5) at main.c(1506) [Receiver=3.0.7]
遇到這個問題:client端已經設定/etc/rsync.pas這個檔案,裡面也設定了密碼111111,和伺服器一致,但是
伺服器段設定有錯誤,伺服器端應該設定/etc/rsync.pas ,裡面內容root:111111 ,這裡登陸名不可缺少

問題3:
rsync -auzv --progress --password-file=/etc/rsync.pas root@192.168.133.128::backup /home/
@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1506) [Receiver=3.0.7]
遇到這個問題,是因為伺服器端的/home/backup 其中backup這個目錄並沒有設定,所以提示:chdir failed

問題4:
rsync: write failed on "/home/backup2010/wensong": No space left on device (28)
rsync error: error in file IO (code 11) at receiver.c(302) [receiver=3.0.7]
rsync: connection unexpectedly closed (2721 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [generator=3.0.7]
磁碟空間不夠,所以無法操作。
可以通過df /home/backup2010 來查看可用空間和已用空間

問題5:網路收集問題
1、許可權問題
類似如下的提示:rsync: opendir "/kexue" (in dtsChannel) failed: Permission denied (13)注意查看同步的目錄許可權是否為755
2、time out
rsync: failed to connect to 203.100.192.66: Connection timed out (110)
rsync error: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.5]
檢查伺服器的連接埠netstat –tunlp,遠程telnet測試。
3、服務未啟動
rsync: failed to connect to 10.10.10.170: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.5]
啟動服務:rsync --daemon --config=/etc/rsyncd.conf
4、磁碟空間滿
rsync: recv_generator: mkdir "/teacherclubBackup/rsync……" failed: No space left on device (28)
*** Skipping any contents from this failed directory ***
5、Ctrl+C或者大量檔案
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(544) [receiver=3.0.5]
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(544) [generator=3.0.5]
6、xnetid啟動
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at io.c(759) [receiver=3.0.5]
查看rsync日誌
rsync: unable to open configuration file "/etc/rsyncd.conf": No such file or directory
xnetid尋找的設定檔位置預設是/etc下,根據具體情況建立軟連結。例如:
ln -s /etc/rsyncd/rsyncd.conf /etc/rsyncd.conf
或者更改指定預設的設定檔路徑,在/etc/xinetd.d/rsync設定檔中。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.