rsync 常见错误及解决方法(中文版)
作者: 蘑菇 日期: 2010-07-28 01:12
编译错误
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同步文件实例
订阅
上一篇
返回
下一篇

标签:


CentOS 安装 Sphinx 全文检索 (2010-07-09 23:21)
Ubuntu 安装 python-mysqldb (2010-07-01 09:47)
shell脚本创建trac项目 (2010-06-18 10:54)
[Ubuntu]BDB安装 (2010-05-31 16:37)
Ubuntu rsync同步文件实例 (2010-05-29 11:58)
[Ubuntu] user is not in the sudoers file. 的解决方法 (2010-05-28 17:45)
ubuntu 安装 dnsmasq 解决网速慢的问题 (2010-04-21 13:41)
python 定时备份MySQL数据库 (2010-04-19 16:50)
CentOS + Nginx + PHP + MySQL 环境搭建 (2010-04-18 22:09)