前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Rsync服务器搭建遇到的报错解决办法

Rsync服务器搭建遇到的报错解决办法

作者头像
张琳兮
发布2018-09-10 11:35:46
2.3K0
发布2018-09-10 11:35:46
举报
文章被收录于专栏:首富手记首富手记首富手记

遇到错误1:

[root@backup tmp]# rsync -avz /etc/hosts -e 'ssh -p 22' root@172.16.1.5:/tmp/

rsync: Failed to exec ssh: No such file or directory (2)

rsync error: error in IPC code (code 14) at pipe.c(84) [sender=3.0.6]

rsync: connection unexpectedly closed (0 bytes received so far) [sender]

rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]

从网上找打解决方法讲是没有安装openssh客户端,然后安装尝试一下

[root@backup tmp]# yum -y install openssh-clients.x86_64

安装完成之后有执行一次,发现错误提示变了,说明刚才那个错误已解决然后开始解决新的报错问题

从本地服务器上推送文件到172.16.1.5这台服务器上,发现一直提示这个错误信息。然后在网上找各种解决方法,最终得以解决。

[root@backup tmp]# rsync -avz /tmp/hosts -e 'ssh -p 22' root@172.16.1.5:/tmp/

root@172.16.1.5's password:

bash: rsync: command not found

rsync: connection unexpectedly closed (0 bytes received so far) [sender]

rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]

造成这种原因是因为172.16.1.5这台服务上没有安装rsync这个软件包,安装后得以解决

[root@backup tmp]# rsync -avz /tmp/hosts -e 'ssh -p 22' root@172.16.1.5:/tmp/

root@172.16.1.5's password:

sending incremental file list

hosts

sent 124 bytes  received 31 bytes  62.00 bytes/sec

total size is 158  speedup is 1.02

[root@lb01 tmp]# ifconfig eth1| awk -F "[ :]+" 'NR==2 {print $4}'

172.16.1.5

[root@lb01 tmp]# ls /tmp/

hosts

对端没有配置文件里面的目录不存在

[root@nfs01 sh]# rsync -avz /backup/ rsync_backup@172.16.1.41::backup/ --password-file\=/etc/rsync.password

@ERROR: chdir failed

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

对端配置文件里面的目录存在,但是权限被拒绝

[root@nfs01 sh]# rsync -avz /backup/ rsync_backup@172.16.1.41::backup/ --password-file\=/etc/rsync.password

sending incremental file list

./

rsync: failed to set times on "." (in backup): Operation not permitted (1)

1/

rsync: recv_generator: mkdir "1" (in backup) failed: Permission denied (13)

*** Skipping any contents from this failed directory ***

sent 46 bytes  received 15 bytes  122.00 bytes/sec

total size is 0  speedup is 0.00

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

模块名称错误

[root@nfs01 sh]# rsync -avz /backup/ rsync_backup@172.16.1.41::baskup/ --password-file\=/etc/rsync.password

@ERROR: Unknown module 'baskup'

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

服务端虚拟用户不存在

[root@nfs01 sh]# rsync -az /backup/ rsync_backup@172.16.1.41::backup/ --password-file\=/etc/rsync.password

@ERROR: invalid uid rsync

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

服务端没有backup模块里面的密码文件,客户端和服务端的密码文件密码不一致

[root@nfs01 sh]# rsync -az /backup/ rsync_backup@172.16.1.41::backup/ --password-file\=/etc/rsync.password

@ERROR: auth failed on module backup

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

在传输的时候远程模块名称前面多写了一个“/”

[root@nfs01 /]# rsync -avz /tmp/  rsync_backup@172.16.1.41::/backup/ --password-file\=/etc/rsync.password              

ERROR: The remote path must start with a module name not a / #远程路径必须是模块名称

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018-05-10 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档