把 rsync 錯誤報告說清楚

2021-09-20 17:59:13 字數 2005 閱讀 6231

rsync configure:

配置一:

ignore errors

說明:這個選項最好加上,否則再很多crontab的時候往往發生錯誤你也未可知,因為你不可能天天去看每時每刻去看log,不加上這個出現錯誤的機率相對會很高,因為任何大點的專案和系統,磁碟io都是乙個瓶頸

rsync error: 

錯誤一: 

@error: auth failed on module ***xx 

rsync: connection unexpectedly closed (90 bytes read so far) 

rsync error: error in rsync protocol data stream (code 12) at io.c(150) 

說明:這是因為密碼設定錯了,無法登入成功,檢查一下rsync.pwd,看客服是否匹配。還有伺服器端沒啟動rsync 服務也會出現這種情況。

錯誤二: 

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] 

說明:防火牆問題導致,這個最好先徹底關閉防火牆,排錯的基本法就是這樣,無論是s還是c,還有ignore errors選項問題也會導致

錯誤五:

@error: access denied to www from unknown (192.168.1.123)

rsync: connection unexpectedly closed (0 bytes received so far) [receiver]

rsync error: error in rsync protocol data stream (code 12) at io.c(359)

說明:此問題很明顯,是配置選項host allow的問題,初學者喜歡乙個允許段做成乙個配置,然後模組又是同乙個,致使導致

錯誤六:

rsync error: received sigint, sigterm, or sighup (code 20) at rsync.c(244) [generator=2.6.9]

rsync error: received sigusr1 (code 19) at main.c(1182) [receiver=2.6.9]

說明:導致此問題多半是服務端服務沒有被正常啟動,到伺服器上去查查服務是否有啟動,然後檢視下 /var/run/rsync.pid 檔案是否存在,最乾脆的方法是殺死已經啟動了服務,然後再次啟動服務或者讓指令碼加入系統啟動服務級別然後shutdown -r now伺服器

錯誤七:

rsync: read error: connection reset by peer (104)

rsync error: error in rsync protocol data stream (code 12) at io.c(604) [sender=2.6.9]

說明:原資料目錄裡沒有資料存在

rsync

把 rsync 錯誤報告說清楚

rsync configure 配置一 ignore errors 說明 這個選項最好加上,否則再很多crontab的時候往往發生錯誤你也未可知,因為你不可能天天去看每時每刻去看log,不加上這個出現錯誤的機率相對會很高,因為任何大點的專案和系統,磁碟io都是乙個瓶頸 rsync error 錯誤一...

rsync 錯誤報告

rsync configure 配置一 ignore errors 說明 這個選項最好加上,否則再很多crontab的時候往往發生錯誤你也未可知,因為你不可能天天去看每時每刻去看log,不加上這個出現錯誤的機率相對會很高,因為任何大點的專案和系統,磁碟io都是乙個瓶頸 rsync error 錯誤一...

PHP錯誤報告

級別常量 錯誤值錯誤報告描述 e error 致命的執行時錯誤 阻止指令碼執行 e warning 執行時警告 非致命性錯誤 e parse 從語法中解析錯誤 e notice 執行時注意訊息 可能是或可能不是乙個問題 e core error php啟動時初始化過程中的致命錯誤 e core wa...