2024年6月6日发(作者:)

Rsync常见错误:

问题一:

@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 file

Password:

原因:

这是因为 s的权限不对,应该设置为600。如:chmod 600

问题五:

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/配置文件内容有错误。请正确核对配置文件。

问题七:

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/打开use chroot = yes。

掠过软连接文件。

问题九:

rsync: read error: Connection reset by peer (104)

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

[receiver=3.0.2]

解决:很大可能是服务器端没有开启 rsync 服务,开启服务。

问题十:

@ERROR: failed to open lock file

rsync error: error starting client-server protocol (code 5) at main.c(1495)

[receiver=3.0.2]

解决:配置文件 中添加 lock file = 即可解决。

Rsync命令详细参数:

-v, --verbose 详细模式输出

-q, --quiet 精简输出模式