报错: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]
解决:
用户名是否写对
报错: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通
报错: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
再次传输,看是否可以进行
/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]
报错: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 永久开启
原文:https://www.cnblogs.com/xuexiaosong/p/13489892.html