rsync安裝使用中出現的報錯


一,查看本地centos的版本:

[root@localhost lib]# cat /etc/redhat-release 
CentOS Linux release 8.1.1911 (Core) 

說明:劉宏締的架構森林是一個專注架構的博客,地址:https://www.cnblogs.com/architectforest

         對應的源碼可以訪問這里獲取: https://github.com/liuhongdi/

 說明:作者:劉宏締 郵箱: 371125307@qq.com

 

二,報錯一:

@ERROR: access denied to wwwroot from localhost (127.0.0.1)
rsync error: error starting client-server protocol (code 5) at main.c(1657) [Receiver=3.1.3]

解決:

說明:rsync配置文件中,wwwroot這個區域沒有放開當前的ip,

          添加ip后重啟服務

 

三,報錯二:

@ERROR: auth failed on module wwwroot
rsync error: error starting client-server protocol (code 5) at main.c(1657) [Receiver=3.1.3]

解決:

    驗證出錯,原因是密碼錯誤,檢查客戶端的密碼文件是否正確

    此處注意:服務端的密碼需要寫成: pusher:123456,格式是 用戶名:密碼,

                   而客戶端的密碼是: 123456,也就是密碼文件中不需要用戶名

 

四,報錯三:

[root@localhost source]# rsync --progress -artuz -R "./abc.txt" pusher@127.0.0.1::wwwroot --password-file=/data/rsync/conf/client.pass
sending incremental file list
rsync: read error: Connection reset by peer (104)
rsync error: error in socket IO (code 10) at io.c(785) [sender=3.1.3]

解決:

      上傳文件時連接被重置,是因為沒有寫權限,

      修改服務端的配置文件,增加寫的權限

 [root@localhost source]# vi /etc/rsyncd.conf

      說明:

     增加內容:

     read only    = no

 

五,報錯四:

[root@localhost source]# rsync -artuz -R "./laoliu.txt" pusher@127.0.0.1::wwwroot --password-file=/data/rsync/conf/client.pass
rsync: failed to connect to 127.0.0.1 (127.0.0.1): Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(127) [sender=3.1.3]

解決:

Connection refused,連接被拒絕

   說明rsync服務沒有正常啟動,正常啟動rsync服務即可

  例如:systemctl start rsyncd

 

六,報錯五:

rsyncd啟動失敗:

[root@localhost source]# systemctl start rsyncd

發現未能成功啟動,用status查看:

[root@localhost source]# systemctl status rsyncd

報:failed to create pid file /data/rsync/run/rsyncd.pid: File exists

處理

[root@localhost source]# rm /data/rsync/run/rsyncd.pid
rm:是否刪除普通文件 '/data/rsync/run/rsyncd.pid'?y
[root@localhost source]# systemctl start rsyncd
[root@localhost source]# 
[root@localhost source]# systemctl status rsyncd
● rsyncd.service - fast remote file copy program daemon
   Loaded: loaded (/usr/lib/systemd/system/rsyncd.service; disabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-02-25 13:04:51 CST; 4s ago

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM