linux rsync 常见错误,Linux rsync常见错误
rsync是類unix系統(tǒng)下非常高效,實(shí)用的數(shù)據(jù)鏡像備份工具。在rsyncd.log里面或.err文件里面,我們都是通過錯誤日志查看,可以分析出錯誤的原因。
問題一:
@ERROR: chroot failed
rsync error: error starting client-server protocol (code 5) at main.c(1522) [receiver=3.0.3]
原因:
服務(wù)器端的目錄不存在或無權(quán)限,創(chuàng)建目錄并修正權(quán)限可解決問題。
問題二:
@ERROR: auth failed on module tee
rsync error: error starting client-server protocol (code 5) at main.c(1522) [receiver=3.0.3]
原因:
服務(wù)器端該模塊(tee)需要驗(yàn)證用戶名密碼,但客戶端沒有提供正確的用戶名密碼,認(rèn)證失敗。
提供正確的用戶名密碼解決此問題。
問題三:
@ERROR: Unknown module ‘tee_nonexists’
rsync error: error starting client-server protocol (code 5) at main.c(1522) [receiver=3.0.3]
原因:
服務(wù)器不存在指定模塊。提供正確的模塊名或在服務(wù)器端修改成你要的模塊以解決問題。
問題1:
在client上遇到問題:
rsync -auzv –progress –password-file=/etc/rsync.pas root@192.168.1.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端沒有設(shè)置/etc/rsync.pas這個文件,而在使用rsync命令的時候,加了這個參數(shù)–
password-file=/etc/rsync.pas
問題2:
rsync -auzv –progress –password-file=/etc/rsync.pas root@192.168.1.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端已經(jīng)設(shè)置/etc/rsync.pas這個文件,里面也設(shè)置了密碼111111,和服務(wù)器一致,但是
服務(wù)器段設(shè)置有錯誤,服務(wù)器端應(yīng)該設(shè)置/etc/rsync.pas ,里面內(nèi)容root:111111 ,這里登陸名不可缺少
問題3:
rsync -auzv –progress –password-file=/etc/rsync.pas root@192.168.1.128::backup /home/
@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1506) [Receiver=3.0.7]
遇到這個問題,是因?yàn)榉?wù)器端的/home/backup 其中backup這個目錄并沒有設(shè)置,所以提示: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:網(wǎng)絡(luò)收集問題
1、權(quán)限問題
類似如下的提示:rsync: opendir “/kexue” (in dtsChannel) failed: Permission denied (13)注意查看同步的目錄權(quán)限是否為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]
檢查服務(wù)器的端口netstat –tunlp,遠(yuǎn)程telnet測試。
可能因?yàn)榭蛻舳嘶蛘叻?wù)端的防火墻開啟 導(dǎo)致無法通信,可以設(shè)置規(guī)則放行 rsync(873端口) 或者直接關(guān)閉防火墻。還有一種在同步過程中可能會提示沒有權(quán)限 (將同步目錄加上SvcwRsync全部權(quán)限即可,更簡單的方法就是將SvcwRsync設(shè)為管理員即可)
3、服務(wù)未啟動
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]
啟動服務(wù):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查找的配置文件位置默認(rèn)是/etc下,根據(jù)具體情況創(chuàng)建軟鏈接。例如:
ln -s /etc/rsyncd/rsyncd.conf /etc/rsyncd.conf
或者更改指定默認(rèn)的配置文件路徑,在/etc/xinetd.d/rsync配置文件中。
總結(jié)
以上是生活随笔為你收集整理的linux rsync 常见错误,Linux rsync常见错误的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: JavaScript --- this
- 下一篇: Linux中查看bz2压缩文件大小,Li