汇总rsync使用中错误信息

错误一: 服务器

@ERROR: auth failed on module xxxxx 网络

rsync: connection unexpectedly closed (90 bytes read so far) socket

rsync error: error in rsync protocol data stream (code 12) at io.c(150) tcp

解决:这是由于密码设置错了,没法登入成功,检查一下rsync.pwd,看客户端和服务器是否匹配。还有服务器端没启动rsync 服务也会出现这种状况。 ui

错误二:.net

@ERROR: auth failed on module rsynccode

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]server

解决:服务器端密码设定错误,客户端没法登入到服务器。服务器端的密码应该以user:password的形式存放明文密码,而客户端的密码只须要以password的明文形式保存。get

错误三: 同步

password file must not be other-accessible 

continuing without password file 

Password: 

解决:这是由于rsyncd.pwd rsyncd.sec的权限不对,应该设置为600。如:chmod 600 rsyncd.pwd 

错误四: 

@ERROR: chroot failed 

rsync: connection unexpectedly closed (75 bytes read so far) 

rsync error: error in rsync protocol data stream (code 12) at io.c(150) 

解决:这是由于你在 rsync.conf 中设置的 path 路径不存在,要新建目录才能开启同步。 

错误五: 

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端口打开。 

错误六: 

错误信息:服务器端已经过secrets file指定了密码文件为/etc/rsyncd.secrets,服务器端但愿客户端经过设定的密码推送或者拉取文件,但实际上客户端不准要密码也能够从服务器段推送或者拉取文件。

解决:secrets file中设定的明文密码文件,只有在该模块中auth users被定义时才起做用。

错误七: 

[root@Real6410 /mnt]# rsync -avzP --password-file=/etc/rsyncd.pwd rsync 10.10.10.100::rsync

@ERROR: invalid gid nobody

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

解决:通常指定的gid为nobody,但错误提示明确指出gid=nobody是非法的,将nobody改成root后,问题解决。

(至于可否改为其余gid,我这里的实验结果都不成功,将目标板中/etc目录下的group和passwd添加新的gid=hxtc,同时服务器端的rsyncd.secrets的用户也改为hxtc:password,同时服务器端的rsyncd.conf中rsync模块下的uid,gid和auth users都设为hxtc,仍然不能成功。)

相关文章
相关标签/搜索