rsync數據同步工具(三)

rsync常見錯誤排錯
1.
rsync:failedtoconnectto118.244.216.177:Noroutetohost(113)
rsyncerror:errorinsocketIO(code10)atclientserver.c(124)[receiver=3.0.6]
緣由:防火牆屏蔽了端口
解決:打開873段考
iptables-iINPUT-ptcp--dport873-jACCEPT
iptables-L
若是以上指令不行,能夠直接停掉防火牆
/etc/init.d/iptablesstop
html

2.
@ERROR:authfailedonmodulebackup
rsyncerror:errorstartingclient-serverprotocol(code5)atmain.c(1506)[Receiver=3.0.7]
那估計是密碼文件沒有設置權限哦:chmod600/home/admin/security/rsync.pass
應該差很少就能夠了
nginx

3.@ERROR:authfailedonmodulexxxxx
rsync:connectionunexpectedlyclosed(90bytesreadsofar)
rsyncerror:errorinrsyncprotocoldatastream(code12)atio.c(150)
這是由於密碼設錯了,沒法登入成功,請檢查一下rsyncd.scrt中的密碼,二端是否一致?
服務器

4.passwordfilemustnotbeother-accessible
continuingwithoutpasswordfile
Password:
這表示rsyncd.scrt的檔案權限屬性不對,應設爲600。
less

5.@ERROR:chrootfailed
rsync:connectionunexpectedlyclosed(75bytesreadsofar)
rsyncerror:errorinrsyncprotocoldatastream(code12)atio.c(150)
這一般是您的rsyncd.conf中的path路徑所設的那個目錄並不存在所致.請先用mkdir開設好要備份目錄
ssh

6.@ERROR:accessdeniedtowwwfromunknown(192.168.1.123)
rsync:connectionunexpectedlyclosed(0bytesreceivedsofar)[receiver]
rsyncerror:errorinrsyncprotocoldatastream(code12)atio.c(359)
最後緣由終於找到了。由於有兩個網段都須要同步該文件夾內容,但沒有在hostsallow後面添加另外一個IP段
hostsallow=192.168.1.0/24
改成
hostsallow=192.168.1.0/24192.168.2.0/24
從新啓動rsync服務,問題解決
socket

7.@ERROR:authfailedonmodulebackup
rsyncerror:errorstartingclient-serverprotocol(code5)atmain.c(1506)[Receiver=3.0.7]
client端沒有設置/etc/rsync.pas這個文件,而在使用rsync命令的時候,加了這個參數--password-file=/etc/rsync.scrt
tcp

8.rsync:recv_generator:mkdir"/teacherclubBackup/rsync……"failed:Nospaceleftondevice(28)
***Skippinganycontentsfromthisfaileddirectory***
磁盤空間滿了
ide

9.rsync:opendir"/kexue"(indtsChannel)failed:Permissiondenied(13)
同步目錄的權限設置不對,改成755
oop

10.rsync:readerror:Connectionresetbypeer(104)
rsyncerror:errorinrsyncprotocoldatastream(code12)atio.c(759)[receiver=3.0.5]
未啓動xinetd守護進程
[root@CC02/]#servicexinetdstart
測試

11.rsync:unabletoopenconfigurationfile"/etc/rsyncd.conf":Nosuchfileordirectory
xnetid查找的配置文件位置默認是/etc下,在/etc下找不到rsyncd.conf文件

12.rsync:failedtoconnectto203.100.192.66:Connectiontimedout(110)
rsyncerror:errorinsocketIO(code10)atclientserver.c(124)[receiver=3.0.5]
鏈接服務器超時,檢查服務器的端口netstat–tunlp,遠程telnet測試

13.我須要在防火牆上開放哪些端口以適應rsync?
視狀況而定。rsync能夠直接經過873端口的tcp鏈接傳文件,也能夠經過22端口的ssh來進行文件傳遞,但你也能夠經過下列命令改變它的端口:
rsync--port8730otherhost::
或者
rsync-e'ssh-p2002'otherhost:

14.我如何經過rsync只複製目錄結構,忽略掉文件呢?
rsync-av--include'*/'--exclude'*'source-dirdest-dir

15.爲何我總會出現"Read-onlyfilesystem"的錯誤呢?
看看是否忘了設"readonly=no"了

16.@ERROR:chrootfailed
rsyncerror:errorstartingclient-serverprotocol(code5)atmain.c(1522)[receiver=3.0.3]
緣由:
服務器端的目錄不存在或無權限。建立目錄並修正權限可解決問題。

17.@ERROR:authfailedonmoduletee
rsyncerror:errorstartingclient-serverprotocol(code5)atmain.c(1522)[receiver=3.0.3]
緣由:
服務器端該模塊(tee)須要驗證用戶名密碼,但客戶端沒有提供正確的用戶名密碼,認證失敗。提供正確的用戶名密碼解決此問題。

18.@ERROR:Unknownmodule‘tee_nonexists’
rsyncerror:errorstartingclient-serverprotocol(code5)atmain.c(1522)[receiver=3.0.3]
緣由:
服務器不存在指定模塊。提供正確的模塊名或在服務器端修改爲你要的模塊以解決問題。

19.權限沒法複製。去掉同步權限的參數便可。(這種狀況多見於Linux向Windows的時候)

詳細出處參考:http://www.nginx.cn/980.html

排錯思路:結合網友寫的FAQ問題總結,客戶端同步時,若是報錯。首先檢查端口/服務端配置文件/密碼文件(配置和權限)/防火牆/服務端是否建立目錄等!

相關文章
相關標籤/搜索