您的位置:首页 > 其它

rsync 常见错误 - 总结

2012-07-22 22:18 246 查看
前段时间做过这个,期间收集了一些Rsync常见的错误及解决办法,整理了以下贴在这里 方便大家参考,可以用Ctrl+F收索关键字来查找自己比较关心的问题

问题一:

@ERROR: chroot failed

rsync error: error starting client-server protocol (code 5) at main.c(1522) [receiver=3.0.3]

原因:

服务器端的目录不存在或无权限。创建目录并修正权限可解决问题。

问题二

@ERROR: auth failed on module tee

rsync error: error starting client-server protocol (code 5) at main.c(1522) [receiver=3.0.3]

原因:

服务器端该模块(tee)需要验证用户名密码,但客户端没有提供正确的用户名密码,认证失败。提供正确的用户名密码解决此问题。或是密码文件不存在指定目录内

问题三:

@ERROR: Unknown module ‘tee_nonexists’

rsync error: error starting client-server protocol (code 5) at main.c(1522) [receiver=3.0.3]

原因:

服务器不存在指定模块。提供正确的模块名或在服务器端修改成你要的模块以解决问题。

问题四:

password file must not be other-accessible

continuing without password filePassword:

原因:

这是因为rsyncd.pwd rsyncd.secrets的权限不对,应该设置为600。如:chmod 600 rsyncd.pwd

问题五:

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

问题六:

rsync error: error starting client-server protocol (code 5) at main.c(1524) [Receiver=3.0.7]

原因:

/etc/rsyncd.conf配置文件内容有错误。请正确核对配置文件。

问题七:

rsync: chown "" failed: Invalid argument (22)

原因:

权限无法复制。去掉同步权限的参数即可。(这种情况多见于Linux向Windows的时候)

问题八:

@ERROR: daemon security issue -- contact admin

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

原因:同步的目录里面有软连接文件,需要服务器端的/etc/rsyncd.conf打开use chroot = yes。掠过软连接文件

B、rsync error: some files could not be transferred (code 23) at main.c(892)

设 置 RSYNC 服务器权限,权限必须是 600或者是服务端的某些文件没有 read 权限造成的,在服务端执行:chmod -R a+r 目录

E、编译错误 options.c:24:18: popt.h: No such file or directory make: *** [options.o] Error 1 解决方法 丢失 popt.h,添加编译选项 --with-included-popt

F、连接错误 @ERROR: auth failed on module rsyncd_module

rsync error: error starting client-server protocol (code 5) at main.c(1383) [receiv er=2.6.9]

解决方法 检查日志文件/var/log/rsyncd.log,以获取更多帮助信息

G、配置文件错误 secrets file must not be other-accessible (see strict modes option) continuing without secrets file 解决方法 初始化设置 strict modes = false 或修改密码文件权限 chmod 600 /path/to/secrets

H、配置文件错误 Ignoring badly formed line in configuration file: xxx 解决方法 检查 /etc/rsyncd.conf 文件中 xxx 所在行,它应该包含变量、等号(=)、和值。

I、配置文件错误 rsync: chroot /path/to/files failed: Operation not permitted (1) 解决方法 如果你没有超级用户权限,请将设置选项 use chroot = false 。 如果为 true,那么在 rsync 在传输文件以前首先 chroot 到 path 参数指定的目录下。 这样做的 原因是实现额外的安全防护,但是缺点是需要 root 权限,并且不能备份指向外部的符号连接指 向的目录文件。

J、客户端错误 rsync: read error: Connection reset by peer (104) rsync error: error in rsync protocol data stream (code 12) at io.c(604) [receiver= 2.6.9] 或 rsync: getaddrinfo: mydomain.com xxx: no address associated with hostname. rsync error: error in socket IO (code 10) at clientserver.c(104) [receiver=2.6.9] 或 rsync: failed to connect to mydomain.com: Connection refused (111) rsync error: error in socket IO (code 10) at clientserver.c(104) [receiver=2.6.9] 解决方法 rsync 服务器没有在指定的端口上运行。检查 rsync 服务器端口是否指定,并检查其是否运 行 ps -aux。

K、客户端错误 @ERROR: auth failed on module rsyncd_module rsync error: error starting client-server protocol (code 5) at /home/lapo/packagin g/tmp/rsync-2.6.6/main.c(1171) 解决方法 rsync 调用时用户名必须在站点名前面,例 如: rsync -auvzbP /cygwin/local/path/ user@remotehost.com::desired_module -port=8730

L、客户端错误 14 [main] (2164) C:Program FilescwRsyncinssh.exe: *** fatal error - C:Program FilescwRsyncinssh.exe: *** system shared memory version mismatch detected 0x2D1E009C/0x75BE009C. 解决方法 请确保你正在 rsync 同一目录下运行 SSH。 此问题可能是由于你使用了不兼容的 Cygwin DLL 版本,在 windows 下查找 cygwin1.dll 并删除所有的旧版本,最新的版本应该在 x:cygwinin (x 为你安装 cygwin 的分区),如果找不到建议重启再试。

M、客户端错误 @ERROR: auth failed on module rsyncd_module rsync error: error starting client-server protocol (code 5) at main.c(1383) [receiv er=2.6.9] 解决方法 配置文件中(通常是/etc/rsyncd.conf)“auth users”选项和“secrets file” 文件中定义给 module 的用户列表不匹配。

N、客户端错误 /bin/sh: rsync: command not found rsync: connection unexpectedly closed (0 bytes received so far) [receiver] rsync error: error in rsync protocol data stream (code 12) at io.c(453) [receiver= 2.6.9] 解决方法 检查 rsync 是否在你当前登录的 ssh 会话的环境变量中。 你可以通过命令 ssh -2 -v 用户@主机 登录到服务器,然后使用 env|grep -i path 来检查。 你可以将/etc/rsyncd/wrapper.sh 添加到/.ssh/authorized_keys 文件的第一行,并将它设 置为可执行权限。

O、服务端错误: 2010/12/27 17:17:39 [20545] name lookup failed for 10.0.0.151: Temporary fail ure in name resolution 2010/12/27 17:17:39 [20545] connect from UNKNOWN (10.0.0.151) 2010/12/27 17:17:39 [20545] rsync denied on module data from unknown (10.0. 0.151) 2010/12/27 17:30:32 [20566] name lookup failed for 10.0.0.130: Temporary fail ure in name resolution /*这个问题是 DNS 解析失败,不影响 RSYNC 正常业务功能*/ 2010/12/27 17:30:32 [20566] connect from UNKNOWN (10.0.0.130) 2010/12/27 17:33:27 [20573] name lookup failed for 10.0.0.130: Temporary fail ure in name resolution 2010/12/27 17:33:27 [20573] connect from UNKNOWN (10.0.0.130)

P、服务端错误: 2010/12/08 11:03:51 [1030] rsync error: error in file IO (code 11) at clientserver .c(862) [receiver=2.6.8] 解决办法:手工创建 /var/run/rsync/rsync.pid
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  rsync