rsync故障排查整理

1.客户端的错误现象:No route to host

rsync服务端开启了iptables防火墙
rsync -avz /etc/hosts [email protected]::backup
rsync: failed to connect to 172.16.1.41: No route to host (113)
解决办法:
关闭rsync服务端的防火墙服务(iptables)

2.ERROR: The remote path must start with a module name not a /

rsync客户端执行rsync命令错误:
rsync -avz /etc/hosts [email protected]::/backup
ERROR: The remote path must start with a module name not a /
问题原因:
rsync命令语法理解错误,::/backup是错误的语法,应该为::backup(rsync模块)

3.@ERROR: auth failed on module backup

rsync -avz /etc/hosts [email protected]::backup
Password:
@ERROR: auth failed on module backup
问题可能原因:
a.密码输入错误;
b.secrets file = /etc/rsync.password指定的密码文件和实际密码文件名称不一致;
c./etc/rsync.password文件权限不是600;
d.rsync_backup:123456密码配置文件后面注意不要有空格;
e.rsync客户端密码文件中只输入密码信息即可,不要输入虚拟认证用户名称

4.Unknown module 'backup'

rsync -avz /etc/hosts [email protected]::backup
@ERROR: Unknown module 'backup'
问题可能原因:
a./etc/rsyncd.conf配置文件模块名称书写错误
b.配置文件中网段限制不对

5.Permission denied

rsync -avz /etc/hosts [email protected]::backup
Password:
sending incremental file list
hosts
rsync: mkstemp ".hosts.5z3AOA" (in backup) failed: Permission denied (13)
问题可能原因:
a.共享目录的属主和属组不正确,不是rsync
b.共享目录的权限不正确,不是755

6.chdir failed

rsync -avz /etc/hosts [email protected]::backup
Password:
@ERROR: chdir failed
问题可能原因:
a.备份存储目录没有建立
b.建立的备份存储目录和配置文件定义不一致
/etc/init.d/xinetd restart
如果没有备份存储目录,xinetd服务都不能正确启动

7.invalid uid rsync

rsync -avz /etc/hosts [email protected]::backup
Password:
@ERROR: invalid uid rsync
问题原因:
rsync服务对应rsync虚拟用户不存在了

8.客户端已经配置了密码文件,依然需要输入密码

rsync -avz /etc/hosts [email protected]::backup --password-file=/etc/rsync.password
password file must not be other-accessible
continuing without password file
Password:
解决问题:
rsync客户端的秘钥文件也必须是600权限

9.rsync客户端连接慢问题

错误日志输出
params.c:Parameter() - Ignoring badly formed line in configuration file: ignore errors
name lookup failed for 172.16.1.31: Name or service not known
connect from UNKNOWN (172.16.1.31)
rsync to backup/ from rsync_backup@unknown (172.16.1.31)
receiving file list
sent 76 bytes  received 83 bytes  total size 349
正确日志输出
params.c:Parameter() - Ignoring badly formed line in configuration file: ignore errors
connect from nfs02 (172.16.1.31)
rsync to backup/ from rsync_backup@nfs02 (172.16.1.31)
receiving file list
sent 76 bytes  received 83 bytes  total size 349
解决方法:
需要在服务端这台机上上的/etc/hosts里面添加客户端机的ip和机器名
172.16.1.31    nfs01

10.rsync服务没有正确启动Connection refused (111)

rsync -avz /etc/hosts [email protected]::backup
rsync: failed to connect to 172.16.1.41: Connection refused (111)
解决方法:
rsync --daemon

11.port 22: Connection refused

环境:本地服务器集群内部传输利用远程ssh 报错
rsync /etc/hosts 172.16.1.31:/tmp
ssh: connect to host 172.16.1.31 port 22: Connection refused
排错思路:
ping 172.16.1.31
traceroute 172.16.1.31
netstat -lntup|grep 22
故障原因:ssh配置有问题
telnet 172.16.1.31 22
解决方法:
vim /etc/ssh/sshd_config
#Port 22
#AddressFamily any
#ListenAddress 10.0.0.31 改为 0.0.0.0
#ListenAddress ::

12.--passwd-file=/etc/rsync.passwd: unknown option

rsync  -az -P /root/ [email protected]::backup --passwd-file=/etc/rsync.passwd
rsync: --passwd-file=/etc/rsync.passwd: unknown option
故障原因:没有正确输入password文件名
正确做法:--password-file=/etc/rsync.password

13.使用Cacti监控Linux服务器网卡流量的配置方法:

http://www.sunbloger.com/article/318.html

注意:在“Data Query”中选择要监控的网卡,记得点那个圆圈...,

添加完成并且将它分类之后,需要等三五分钟才能看见,不要急,不要认为你没有添加成功..

参考博客:https://www.cnblogs.com/wang-xd/p/6551402.html

转载于:https://www.cnblogs.com/fawaikuangtu123/p/8185312.html

你可能感兴趣的:(运维,开发工具,操作系统)