1.当前用户名写错
报错:auth failed on module backup 模块备份验证失败
[root@web01 ~]# rsync -avz rsync_bac@172.16.1.41::backup ./ --password-file=/etc/rsyncd.passwd
@ERROR: auth failed on module backup
rsync error: error starting client-server protocol (code 5) at main.c(1649) [Receiver=3.1.2]
解决:
用户名是否写对
2.传输的主机ip写错
报错:Connection timed out 连接超时
[root@web01 ~]# rsync -avz rsync_back@172.16.1.40::backup ./ --password-file=/etc/rsyncd.passwd
rsync: failed to connect to 172.16.1.40 (172.16.1.40): Connection timed out (110)
rsync error: error in socket IO (code 10) at clientserver.c(125) [Receiver=3.1.2]
解决:
看查看主机ip是否写错,再看是否能ping通
3.rsyncd服务未启动
报错:Connection refused 拒绝连接
[root@web01 ~]# rsync -avz rsync_backup@172.16.1.41::backup ./ --password-file=/etc/rsync.passwd
rsync: failed to connect to 172.16.1.41 (172.16.1.41): Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(125) [Receiver=3.1.2]
解决:
查看用户名是否写对
查看是否可以ping通
查看服务是否启动
[root@web01 ~]# ps -ef |grep rsync
[root@web01 ~]# netstat -lntp |grep rsync
启动rsyncd
[root@web01 ~]# systemctl start rsyncd
查看服务是否启动
[root@web01 ~]# ps -ef |grep rsync
[root@web01 ~]# netstat -lntp |grep rsync
再次传输,看是否可以进行
4.虚拟用户不同
/etc/rsyncd.conf 配置文件的授权虚拟用户与/etc/rsync.passwd的虚拟用户不同
报错:auth failed on module backup 模块备份验证失败
[root@web01 ~]# rsync -avz rsync_backup@172.16.1.41::backup ./ --password-file=/etc/rsyncd.passwd
@ERROR: auth failed on module backup
rsync error: error starting client-server protocol (code 5) at main.c(1649) [Receiver=3.1.2]
解决:
修改虚拟用户相同,虚拟用户可以不存在系统中
服务端
/etc/rsyncd.conf:auth users = rsync_back [rsync_back]
/etc/rsyncd.passwd:rsync_back:123456 [rsync_back]
5.防火墙未关
报错:No route to host 找不到主机
[root@web01 ~]# rsync -avz rsync_back@172.16.1.41::backup ./ --password-file=/etc/rsyncd.passwd
rsync: failed to connect to 172.16.1.41 (172.16.1.41): No route to host (113)
rsync error: error in socket IO (code 10) at clientserver.c(125) [Receiver=3.1.2]
解决:
[root@web01 ~]# vim /etc/selinux/config SELINUX=enforcing 改成 SELINUX=disabled
[root@web01 ~]# systemctl stop firewalld 先停用
[root@web01 ~]# systemctl disable firewalld 再永久关闭
//[root@web01 ~]# systemctl start firewalld 启用
//[root@web01 ~]# systemctl enable firewalld 永久开启
1)报错1
#报错:
[root@web01 ~]# rsync -avz rsync_backup@172.16.1.41::backu ./
@ERROR: Unknown module 'backu'
#原因:
模块名字与服务端配置没有对应
2)报错2
#报错:
[root@web01 ~]# rsync -avz /tmp/ rsync_backup@172.16.1.41::backup
sending incremental file list
rsync: failed to write xattr user.rsync.%stat for "." (in backup): Permission denied (13)
rsync: failed to set times on "." (in backup): Operation not permitted (1)
./
sent 176 bytes received 205 bytes 762.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1179) [sender=3.1.2]
#原因:
1.权限不足,服务端目录权限过高
2.selinux
3)报错3
#错误:
[root@web01 ~]# rsync -avz /tmp/ rsync_back@172.16.1.41::backup
@ERROR: auth failed on module backup
#原因:
1.虚拟用户错误
2.密码错误
3.密码文件权限不是600
4.服务端密码文件不存在
4)报错4
#错误:
[root@web01 ~]# rsync -avz /tmp/ rsync_backup@172.16.1.41::/backup
ERROR: The remote path must start with a module name not a /
#原因:
守护进程模式::后面跟的是模块名字,而不是目录名字
5)报错5
#错误:
[root@web01 ~]# rsync -avz /tmp/ rsync_backup@172.16.1.41::backup
rsync: failed to connect to 172.16.1.41 (172.16.1.41): Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(125) [sender=3.1.2]
#原因:
服务端服务没有启动
6)报错6
#错误:
[root@web01 ~]# rsync -avz /tmp/ rsync_backup@172.16.1.41::backup
rsync: failed to connect to 172.16.1.41 (172.16.1.41): No route to host (113)
rsync error: error in socket IO (code 10) at clientserver.c(125) [sender=3.1.2]
#原因:
防火墙开启
7)报错7
#错误
[root@web01 ~]# rsync -avz /tmp/ rsync_backup@172.16.1.41::backup
@ERROR: chdir failed
#原因:
服务端文件目录不存在