linux 重启rsync服务,linux-rsync服务的常见问题

1,我们删掉服务器上的共享目录

[root@B data]# rsync

-avz  /data/

rsync_backup@192.168.42.128::xiaomi

--password-file=/etc/rsync.password

@ERROR:

chdir failed

表示找不到目录

这个是日志文件里面的内容

[root@A ~]# cat /var/log/rsyncd.log

2015/11/12 13:50:04 [3338] params.c:Parameter() -

Ignoring badly formed line in configuration file: ignore

errors

2015/11/12 13:50:04 [3338] name lookup failed for

192.168.42.130: Name or service not

known

2015/11/12 13:50:04 [3338] connect from UNKNOWN

(192.168.42.130)   2015/11/12

13:50:04 [3338] rsync: chdir /xiaomi failed

: No such

file or directory (2)

rsync error: error starting client-server protocol

(code 5) at main.c(1503) [sender=3.0.6]

2,我们在服务器上创建/xiaomi

/目录

[root@B data]# rsync -avz

/data/  rsync_backup@192.168.42.128::xiaomi

--password-file=/etc/rsync.password

sending incremental file

list

./   rsync: failed to set times

on "." (in xiaomi): Operation not permitted

(1)

1

2

3

4

5

b

c

d

paichu.log

test/

rsync: recv_generator: mkdir "test" (in xiaomi) failed:

Permission denied (13)

权限不够,被拒绝

*** Skipping any contents from this failed directory

***

rsync: mkstemp ".1.sslU2p" (in xiaomi) failed:

Permission denied (13)

rsync: mkstemp ".2.ufzVJ3" (in xiaomi) failed:

Permission denied

(13)

rsync: mkstemp ".3.u7MYqH" (in xiaomi) failed:

Permission denied

(13)

rsync: mkstemp ".4.sg327k" (in xiaomi) failed:

Permission denied

(13)

rsync: mkstemp ".5.bTg8OY" (in xiaomi) failed:

Permission denied

(13)

rsync: mkstemp ".a.yPKhwC" (in xiaomi) failed:

Permission denied

(13)

rsync: mkstemp ".b.Suosdg" (in xiaomi) failed:

Permission denied

(13)

rsync: mkstemp ".c.r0gGUT" (in xiaomi) failed:

Permission denied

(13)

rsync: mkstemp ".d.E9EWBx" (in xiaomi) failed:

Permission denied

(13)

rsync: mkstemp ".paichu.log.0Fiejb" (in xiaomi) failed:

Permission denied (13)   sent 540

bytes  received 205 bytes

1490.00 bytes/sec   total size is

10  speedup is

0.01

rsync error: some files/attrs were not transferred (see

previous errors) (code 23) at main.c(1039)

[sender=3.0.6]

因为该目录需要rsync访问

出现错误后,查看的日志文件,提示:权限不够

[root@A ~]# cat /var/log/rsyncd.log

2015/11/12 13:52:18 [3347] params.c:Parameter() -

Ignoring badly formed line in configuration file: ignore

errors

2015/11/12 13:52:18 [3347] name lookup failed for

192.168.42.130: Name or service not

known

2015/11/12 13:52:18 [3347] connect from UNKNOWN

(192.168.42.130)   2015/11/12

13:52:18 [3347] rsync to xiaomi/ from rsync_backup@unknown

(192.168.42.130)

2015/11/12 13:52:18 [3347] receiving file

list   2015/11/12 13:52:18 [3347]

rsync: failed to set times on "." (in xiaomi): Operation not

permitted (1)

2015/11/12 13:52:18 [3347] *** Skipping any contents

from this failed directory

***

2015/11/12 13:52:18 [3347] rsync: mkstemp ".1.ondWti"

(in xiaomi) failed: Permission denied

(13)

2015/11/12 13:52:18 [3347] rsync: mkstemp ".2.BnRUrI"

(in xiaomi) failed: Permission denied

(13)

2015/11/12 13:52:18 [3347] rsync: mkstemp ".3.wOyUp8"

(in xiaomi) failed: Permission denied (13)

2015/11/12 13:52:18 [3347] rsync: mkstemp ".4.DIbVny"

(in xiaomi) failed: Permission denied

(13)

2015/11/12 13:52:18 [3347] rsync: mkstemp ".5.7gIWlY"

(in xiaomi) failed: Permission denied

(13)

2015/11/12 13:52:18 [3347] rsync: mkstemp ".a.a3bZjo"

(in xiaomi) failed: Permission denied

(13)

2015/11/12 13:52:18 [3347] rsync: mkstemp ".b.aBF2hO"

(in xiaomi) failed: Permission denied

(13)

2015/11/12 13:52:18 [3347] rsync: mkstemp ".c.qF86fe"

(in xiaomi) failed: Permission denied

(13)

2015/11/12 13:52:18 [3347] rsync: mkstemp ".d.MRuceE"

(in xiaomi) failed: Permission denied

(13)

2015/11/12 13:52:18 [3347] rsync: mkstemp

".paichu.log.BWemc4" (in xiaomi) failed: Permission denied

(13)

2015/11/12 13:52:18 [3347] sent 1245

bytes  received 597 bytes  total

size 10

要修改文件的属主和属组

chown -R rsync.rsync /xiaomi/

3,开启了防火墙  /etc/init.d/iptables

start

[root@B data]# rsync -avz

/data/

rsync_backup@192.168.42.128::xiaomi

--password-file=/etc/rsync.password

rsync: failed to connect to 192.168.42.128: No route to

host (113)

没有去往主机的路由

rsync error: error in socket IO (code 10) at

clientserver.c(124)

[sender=3.0.6]

开启防火墙后,在客户端执行命令,日志文件里面没有任何内容

4,

杀掉rsync服务pid   pkill

rsync

[root@B data]# rsync -avz

/data/  rsync_backup@192.168.42.128::xiaomi

--password-file=/etc/rsync.password

rsync: failed to connect to 192.168.42.128: Connection

refused (111)

连接被拒绝   rsync error: error in

socket IO (code 10) at clientserver.c(124)

[sender=3.0.6]

方法:重启rsync服务  rsync --daemon

5,将/etc/rsync.password的权限修改为755

[root@B data]# rsync

-avz  /data/

rsync_backup@192.168.42.128::xiaomi

--password-file=/etc/rsync.password

@ERROR: auth failed on module xiaomi

认证失败在oldboy模块上

rsync error: error starting client-server protocol

(code 5) at main.c(1503)

[sender=3.0.6]

查看日志文件

[root@A ~]# cat

/var/log/rsyncd.log

2015/11/12 14:33:33 [3586] params.c:Parameter() -

Ignoring badly formed line in configuration file: ignore

errors

2015/11/12 14:33:33 [3586] name lookup failed for

192.168.42.130: Name or service not

known

2015/11/12 14:33:33 [3586] connect from UNKNOWN

(192.168.42.130)   2015/11/12

14:33:33 [3586] secrets file must not be other-accessible (see

strict modes option)

密码文件不能被其他用户可见

2015/11/12 14:33:33 [3586] continuing without secrets

file

2015/11/12 14:33:33 [3586] auth failed on module xiaomi

from unknown (192.168.42.130): missing secret for user

"rsync_backup"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值