rsync同步出错以及解决办法。
1、@ERRPR:chdir failed
错误原因:
服务器端没有提供访问的⽬录 /backup
处理⽅法:
需要在服务器端创建,并赋予权限rsync管理权限
mkdir /backup
chown -R rsync.rsync /backup/
2、@ERROR: auth failed on module backup
查看服务端/etc/rsync.password 配置⽂件是否有问题
⽐如:
多余的空格空⾏
rsync error: error startingclient-serverprotocol (code 5) at main.c(1503) [sender=3.0.6]
错误原因
1>    客户端密码⽂件的权限不是600
2>    服务端密码⽂件不是600
3>    服务端密码⽂件不存在(名字写错了/没有创建/配置⽂件参数写错了)
4>    服务端密码⽂件⾥保存的⽤户名和密码不正确
3、@ERROR:invalid uid rsync
不可⽤的uid
useradd rsync -s /sbin/nologin -M
4、@ERROR: chroot failed
@ERROR:chroot failed
rsyncerror: error starting client-server protocol (code 5) at main.c(1522)[receiver=3.0.3]
服务器端的⽬录不存在或⽆权限,创建⽬录并修正权限可解决问题。
5、@ERROR: auth failed on module tee
rsync error: error starting client-serverprotocol (code 5) at main.c(1522) [receiver=3.0.3]
服务器端该模块(tee)需要验证⽤户名密码,但客户端没有提供正确的⽤户名密码,认证失败。
提供正确的⽤户名密码解决此问题。
6、@ERROR: Unknown module ‘tee_nonexists'
rsync error: error starting client-serverprotocol (code 5) at main.c(1522) [receiver=3.0.3]
服务器不存在指定模块。提供正确的模块名或在服务器端修改成你要的模块以解决问题。
1>    推送/拉取命令写错了
2>    服务端模块名字写错了
7、rsync: --passwork-file=/etc/rsync.password: unknown option
rsync: --passwork-file=/etc/rsync.password:unknown option
rsync error: syntax or usage error (code 1)at main.c(1422) [client=3.0.6]
错误原因:
/etc/rsync.password⽂件名称写错
解决⽅法:
更正/etc/rsync.password⽂件名称
8、rsync: ERROR:cannot stat destination
sending incremental file list
rsync: ERROR: cannot stat destination"." (in backup): Permission denied (13)
rsync error: errors selecting input/outputfiles, dirs (code 3) at main.c(554) [receiver=3.0.6] rsync: connection unexpectedly closed (5bytes received so far) [sender]
rsync error: error in rsync protocol datastream (code 12) at io.c(600) [sender=3.0.6]
错误原因:
服务端rsync对⽬录操作权限不⾜
解决⽅法:
修改对应⽬录权限755
[root@oldboy~]# chmod 755 /backup/
[root@oldboy~]# ll -ld /backup/
drwxr-xr-x.12 rsync rsync 4096 Sep 23 19:17 /backup/
9、rsync: write failed on "/home/backup2010/ ": No space lefton device (28)
rsync:write failed on "/home/backup2010/wensong": No space left on device(28) rsyncerror: error in file IO (code 11) at receiver.c(302) [receiver=3.0.7]
rsync:connection unexpectedly closed (2721 bytes received so far) [generator] rsyncerror: error in rsync protocol data stream (code 12) at io.c(601) [generator=3.0.7]
问题原因:
磁盘空间不够,所以⽆法操作。
解决⽅法:
可以通过df /home/backup2010 来查看可⽤空间和已⽤空间
10、rsync: opendir "/kexue" (in dtsChannel) failed: Permissiondenied (13)
注意查看同步的⽬录权限是否为755
11、rsync: failed to connect to 203.100.192.66: Connection timed out(110)
rsync:failed to connect to 203.100.192.66: Connection timed out (110)
rsyncerror: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.5]
检查服务器的端⼝netstat ?tunlp,远程telnet测试。
可能因为客户端或者服务端的防⽕墙开启导致⽆法通信,可以设置规则放⾏ rsync(873端⼝)或者直接关闭防⽕墙。
关服务端selinux 和iptabs 防⽕墙
还有⼀种在同步过程中可能会提⽰没有权限(将同步⽬录加上SvcwRsync全部权限即可,更简单的⽅法就是将SvcwRsync设为管理员即可)
需要给/etc/rsync.password 600权限
[root@backup backup]# ll -ld/etc/rsync.password
-rw-------. 1 root root 20 Sep 22 21:16/etc/rsync.password
12、rsync: failed to connect to 10.10.10.170: Connection refused (111)
rsync:failed to connect to 10.10.10.170: Connection refused (111)
rsyncerror: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.5]
启动服务:rsync --daemon--config=/f
13 、rsync:recv_generator: mkdir "/teacherclubBackup/rsync……" failed: No spaceleft on device (28)
*** Skipping any contents from this faileddirectory ***
磁盘空间满
14、rsync error: received SIGINT, SIGTERM, orSIGHUP (code 20) at rsync.c(544) [receiver=3.0.5]
rsyncerror: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(544)[generator=3.0.5]
unknown怎么处理Ctrl+C或者⼤量⽂件
15、rsync: read error: Connection reset by peer (104)
rsync:read error: Connection reset by peer (104)
rsync error: error in rsync protocol datastream (code 12) at io.c(759) [receiver=3.0.5]
xnetid启动
查看rsync⽇志
rsync: unable to open configuration file"/f": No such file or directory
xnetid查的配置⽂件位置默认是/etc下,根据具体情况创建软链接。例如:
ln -s /etc/f /f
或者更改指定默认的配置⽂件路径,在/etc/xinetd.d/rsync配置⽂件中。
16、rsync:recv_generator: mkdir"nfs01_172.16.1.31" (in backup) failed:Permission denied (13) sendingincremental file list
./
rsync:failed to set times on"." (in backup): Operation not permitted (1)
nfs01_172.16.1.31/
rsync:recv_generator: mkdir"nfs01_172.16.1.31" (in backup) failed:Permission denied (13)
***Skipping any contents fromthis failed directory ***
sent 106bytes  received 15 bytes  80.67 bytes/sec
totalsize is 655  speedup is 5.41
rsyncerror: some files/attrs were not transferred (see previous errors) (code 23) atmain.c(1039) [sender=3.0.6]错误原因:
1、服务端配置⽂件中指定的⽤户和模块指定的⽬录的属主属组不同
2、服务端模块指定的⽬录属组属组没有权限
解决⽅法:
将模块指定⽬录的属主属组修改为配置⽂件中指定的 uid gid
[root@nfs01 ~]# chown rsync.rsync/backup          配置⽂件中指定的⽤户和组
17、skippingnon-regular file “vendor/bin/doctrine”
receivingincremental file list
skippingnon-regular file “vendor/bin/doctrine”
skippingnon-regular file “vendor/bin/doctrine.php”
sent1990 bytes received 489209 bytes 327466.00 bytes/sec total size is 182515746speedup is 371.57
原因:
source源⽂件有软链接。
解决⽅法:
修改为 rsync -va,其中 -a== -rlptgoD (no -H,-A,-X) 或者 rsync -rvltOD 也可以。
解决后:
receiving incremental file list
vendor/bin/doctrine ->../doctrine/orm/bin/doctrine
vendor/bin/doctrine.php ->../doctrine/orm/bin/doctrine.php
sent 1998 bytes received 489279 bytes327518.00 bytes/sec total size is 182515746 speedup is 371.51
18、@ERROR: module is read only
sendingincremental file list
ERROR:module is read only
rsyncerror: syntax or usage error (code 1) at main.c(866) [receiver=3.0.6]
rsync:read error: Connection reset by peer (104)
rsyncerror: error in rsync protocol data stream (code 12) at io.c(759)[sender=3.0.6]
原因:
source源服务器端权限设置read为only只读权限。
解决⽅法:
read only = false
19、password file must not be other-accessible
passwordfile must not be other-accessible
passwordfile must not be other-accessible
continuingwithout password file
Password:
原因:
这是因为rsyncd.pwd rsyncd.secrets的权限不对,应该设置为600。
解决⽅法:
chmod 600 rsyncd.pwd
20、rsync error: error starting client-server protocol
rsyncerror: error starting client-server protocol
rsyncerror: error starting client-server protocol (code 5) at main.c(1524)[Receiver=3.0.6]
原因:
/f配置⽂件内容有错误。请正确核对配置⽂件。
21、 rsync: chown “” failed: Invalid argument (22)
rsync:chown “” failed: Invalid argument (22)
原因:
权限⽆法复制。去掉同步权限的参数即可。(这种情况多见于Linux向Windows的时候)
22、@ERROR: daemon security issue — contactadmin
@ERROR:daemon security issue — contact admin rsync error: error starting client-serverprotocol (code 5) at main.c(1530) [sender=3.0.6]原因:
同步的⽬录⾥⾯有权限不⾜的软连接⽂件,需要服务器端的/f打开use chroot = yes。
23、rsync: read error: Connection reset by peer (104)
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.6]
解决:
很⼤可能是服务器端没有开启 rsync 服务,开启服务。
24、@ERROR: failed to openlock file
@ERROR:failed to open lock file rsync error: error starting client-server protocol(code 5) at main.c(1495) [receiver=3.0.6]

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。