English Sentence Loading...
英语句子加载中...
订阅所有Linux的日志 订阅 | 上一篇上一篇 | 返回 返回 | 下一篇
Linux

rsync 常见错误及解决方法(中文版)

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

-------------------------------------------------------------------------------------------------------------

连接错误
@ERROR: auth failed on module rsyncd_module
rsync error: error starting client-server protocol (code 5) at main.c(1383) [receiver=2.6.9]
解决方法
检查日志文件/var/log/rsyncd.log,以获取更多帮助信息

-------------------------------------------------------------------------------------------------------------

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

-------------------------------------------------------------------------------------------------------------

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

-------------------------------------------------------------------------------------------------------------

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

-------------------------------------------------------------------------------------------------------------

客户端错误
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。

-------------------------------------------------------------------------------------------------------------

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

-------------------------------------------------------------------------------------------------------------

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

-------------------------------------------------------------------------------------------------------------

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

-------------------------------------------------------------------------------------------------------------

客户端错误
/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 mylogin@mydomain.com 登录到服务器,然后使用 env|grep -i path 来检查。
你可以将/etc/rsyncd/wrapper.sh添加到/.ssh/authorized_keys文件的第一行,并将它设置为可执行权限。

-------------------------------------------------------------------------------------------------------------

更从配置说明与参数介绍请参阅:Ubuntu rsync同步文件实例

标签: rsync linux
评论: 0 | 引用: 0 | 阅读: 71 | 打印 | 打包
发表评论
昵 称: 密 码:
网 址: 邮 箱:
验证码: 验证码图片 选 项:
头 像:
内 容: