免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1524 | 回复: 3
打印 上一主题 下一主题

请教一个rsync服务器问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-09-02 20:59 |只看该作者 |倒序浏览
服务器上:cat /etc/rsyncd.conf
uid = nobody
gid = nobody
use chroot = no                 # 不使用chroot
max connections = 2             # 最大连接数为2
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log  # 日志记录文件

[nagios]                        # 这里是认证的模块名,在client端需要指定
path = /usr/local/nagios/       # 需要做镜像的目录
ignore errors                   # 可以忽略一些无关的IO错误
read only = yes                 # 只读
list = no                       # 不允许列文件
auth users = nagios             # 认证的用户名,如果没有这行,则表明是匿名
secrets file = /etc/nagios.pas    # 认证文件名
然后:cat /etc/nagios.pas
nagios:123456
ls -l /etc/nagios.pas
-r--------  1 root root 14 Sep  2 20:52 /etc/nagios.pas

客户端上:
#cat /etc/nagios.pas
nagios:123456
#ls -l /etc/nagios.pas
-r--------  1 root root 14 Sep  2 20:52 /etc/nagios.pas

然后#rsync -vzrtopg --progress --delete --password-file=/etc/nagios.pas nagios@server_ip::nagios /usr/local/nagios/
@ERROR: auth failed on module nagios
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)

这是什么原因?

[ 本帖最后由 忧郁的葡萄 于 2006-9-2 21:01 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2006-09-02 23:24 |只看该作者
没人知道么?

论坛徽章:
0
3 [报告]
发表于 2006-09-02 23:44 |只看该作者
我在server用rsync --daemon启动后,/var/log怎么没有rsyncd.log 文件?
但是把rsync进程停掉是报:rsync: failed to connect to 10.0.77.203: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(94)
换成用xinetd启动客户端去连也还是报同样的错误

论坛徽章:
0
4 [报告]
发表于 2006-09-03 11:37 |只看该作者
客户端那个pas文件只写密码就可以了,不用用户名试试。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP