首页 > 代码库 > Rsync同步报错【ERROR: Unknown module】

Rsync同步报错【ERROR: Unknown module】

一,环境描述:

192.168.1.10  rsyncd服务端

192.168.1.2,192.168.1.3 rsyncd客户端


二,配置:

192.168.1.10 服务端配置:


1,rsyncd.conf 配置:

[root@localhost ~]# cat /etc/rsyncd.conf 

# write by Chris on 20140915

# rsync服务端配置文件


uid = www

gid = www

use chroot = no

max connections = 1024

pid file = /var/run/rsyncd.pid

log file = /var/log/rsyncd.log

hosts allow = 192.168.1.2

hosts allow = 192.168.1.3


[test]

path = /www/test/

comment = test

ignore errors = true

read only = no

list = no

auth users = www

secrets file = /etc/rsync.pass


2,rsync.pass 文件属性和账号密码:


[root@localhost ~]# ll /etc/rsync.pass

-rw------- 1 root root 15 Sep 15 00:07 /etc/rsync.pass

[root@localhost ~]# cat /etc/rsync.pass

www:xvdaf+Ax8


192.168.1.2,192.168.1.3 客户端同步命令:

remoteip="192.168.1.10"

appName="test"

/usr/bin/rsync -avz --password-file=$HOME/.rsync.pas --exclude-from=exclude.txt www@${remoteip}::test /www/${appName}


执行结果:

192.168.1.3 客户端正常同步

192.168.1.2 客户端报错如下

rsync   www@${remoteip}::test  @ERROR: Unknown module ‘test‘  不认识我的模块


解决:

rsyncd.conf 文件

hosts allow = 192.168.1.2

hosts allow = 192.168.1.3

修改为

hosts allow = 192.168.1.2,hosts allow = 192.168.1.3


同步正常。

本文出自 “风” 博客,请务必保留此出处http://1081025.blog.51cto.com/1071025/1573638

Rsync同步报错【ERROR: Unknown module】