1. 程式人生 > >srync:@ERROR: auth failed on module tee 的解決辦法分析

srync:@ERROR: auth failed on module tee 的解決辦法分析

3.1 get 模塊名 unable hosts rod client 復制 無法

首先:檢查server端和client端的用戶名和密碼確認都無誤;

然後:檢查了服務器端/etc/rsyncd.conf 配置文件未發現異常,

再次:通過配置文件找到了log存放目錄

$ cat /etc/rsyncd.conf | grep -i log

log file = /var/log/rsync.log

查看/var/log/rsync.log發現

2017/07/21 09:38:33 [31746] name lookup failed for xxx.xx.xxx.xx: Name or service not known
2017/07/21 09:38:33 [31746] connect from UNKNOWN (xxx.xx.xxx.xx)
2017/07/21 09:38:33 [31746] auth failed on module ci from unknown (xxx.xx.xxx.xx): missing secret for user "pesdfk"

在server的/etc/hosts裏加上IP和主機名的映射,我沒有采用該建議。因為這個系統一直是我在維護,上周還有版本上線

運行都正常。

主要還是圍繞客戶端的@ERROR: auth failed on module backup在猜想,肯定是用戶驗證出了異常。

又google了一下,看到有網友提示,server端rsync.pass文件的格式user:passwrod , 修改成user:passwrod後在client端重新上傳文件正常。

奇怪的是之前一直都正常,而且rsync.pass上次修改日期是2016年。

附錄:rsync常見問題及解決辦法 (轉載自:http://kkkkkk.blog.51cto.com/468162/1194202)

問題一:

@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]

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


問題四:
password file must not be other-accessible
continuing without password file
Password:
原因:
這是因為rsyncd.pwd rsyncd.secrets的權限不對,應該設置為600。如:chmod 600 rsyncd.pwd
問題五:
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端口打開。

問題六:
rsync error: error starting client-server protocol (code 5) at main.c(1524) [Receiver=3.0.7]
原因:
/etc/rsyncd.conf配置文件內容有錯誤。請正確核對配置文件。
問題七:
rsync: chown "" failed: Invalid argument (22)
原因:
權限無法復制。去掉同步權限的參數即可。(這種情況多見於Linux向Windows的時候)


問題八:
@ERROR: daemon security issue -- contact admin
rsync error: error starting client-server protocol (code 5) at main.c(1530) [sender=3.0.6]
原因:
同步的目錄裏面有軟連接文件,需要服務器端的/etc/rsyncd.conf打開use chroot = yes。掠過軟連接文件。


問題九:
ERROR: module is read only
rsync error: syntax or usage error (code 1) at main.c(747) [receiver=2.6.8]
rsync: connection unexpectedly closed (4 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]
解決: 提示打開了read only,將配置文件 read only = no

問題十:
cat /var/log/rsyncd.log
2011/12/14 11:58:37 [22377] name lookup failed for XX.XX.XX.XX: Name or service not known
2011/12/14 11:58:37 [22377] connect from UNKNOWN (XX.XX.XX.XX)
2011/12/14 11:58:37 [22377] rsync to html/ from unknown (XX.XX.XX.XX)
解決:需要在服務端這臺機上上的/etc/hosts裏面添加客戶端機的ip和機器名

問題十一:

[root@Dell-R710 ~]# rsync -artuz -R --delete ./ 192.168.1.233::gex
rsync: failed to connect to 61.145.118.206: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(124) [sender=3.0.6]
解決:
一、查看防火墻
二、查看服務端是否開啟守護進程
ps ax|grep rsync
rsync --daemon --config=/etc/rsyncd.conf

#####################################################################

問題1:
在client上遇到問題:
rsync -auzv --progress --password-file=/etc/rsync.pas [email protected]::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 [email protected]::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 [email protected]::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配置文件中

srync:@ERROR: auth failed on module tee 的解決辦法分析