rsync常见问题及解决办法(亲测)

简介:

rsync在使用中往往会报错误,综合自己亲身经验,总结几条错误的解决方案(IP以10.10.10.10代替):

错误一:

password file must not be other-accessible
continuing without password file
Password:
rsync客户端路径是否写错,权限设置不对,需要再次输入密码,客户端和服务端的密码文件都应该是600的权限才可以

错误二:

@ERROR: Unknown module ‘bak’
rsync error: error starting client-server protocol (code 5) at main.c(1522) [receiver= 3.0.3]
服务端server的配置中的[bak]名字和客户端client的10.10.10.10::bak不符

错误三:

rsync: failed to connect to 10.10.10.10: Connection timed out (110)
rsync error: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.6]
检查服务端server服务是否正常启动,检查端口防火墙,iptables打开873端口
如果服务端是windows server则在防火墙入站规则中增加873端口
如果服务端是Linux则先检查服务是否启动#ps aux | grep rsync
然后开启873端口#iptables -A INPUT -p tcp --dport 873 -j ACCEPT开启873端口
附:
安装rsync yum install rsync
启动服务/usr/bin/rsync --daemon
启动服务错误failed to create pid file /var/rsyncd.pid: File exists
看看提示服务错误的路径(这个路径不一定就是这个,看自己的报错路径)这里是/var/rsyncd.pid所以
rm -rf /var/rsyncd.pid;再重新启动Rsync服务
此时在看一下ps aux | grep rsync启动成功

错误四:

@ERROR: access denied to gmz88down from unknown (10.10.10.10)
rsync error: error starting client-server protocol (code 5) at main.c(1503) [receiver=3.0.6]
看看是不是服务端server hosts allow限制了IP,把这里的IP加入到服务端server的hosts allow白名单中,windows rsync不能写多个allow,可以在一个allow中加多个IP,例:hosts allow=10.10.10.10 20.20.20.20

错误五:

@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1503) [receiver=3.0.6]
服务端server的目录不存在或者没有权限(要同步的那个文件路径),安装windows rsync时候会创建一个SvcCWRSYNC用户,这个用户对要拷贝的目录没有权限,方法一,将这个用户给权限加入到目录中,方法二,修改这个用户隶属于的组,修改后要在管理中重启服务

错误六:

rsync error: error starting clie
nt-server protocol (code 5) at main.c(1524) [Receiver= 3.0.7 ]
/etc/rsyncd.conf配置文件内容有错误,检查下配置文件

错误七:

rsync: ch
own "" failed: Invalid argument (22)
权限无法复制,去掉同步权限的参数即可

错误八:

@ERROR: auth failed on module bak
rsync error: error starting client-server protocol (code 5) at main.c(1530) [receiver=3.0.6]
密码错误或服务器上是否有bak模块

错误九:

rsync: connection unexpectedly closed (5 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]
模块read only = no设置为no false

错误十:

@ERROR: invalid uid nobody
rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]
设置
uid =0
gid = 0

错误十一:

rsync: failed to connect to 10.10.10.10: No route to host (113)
rsync error: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.6]
防火墙原因

错误十二:

rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at io.c(759) [receiver=3.0.6]

/etc/rsyncd.conf配置文件不存在

错误十三:

rsync: Failed to exec ssh: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(84) [receiver=3.0.6]
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in IPC code (code 14) at io.c(600) [receiver=3.0.6]

需要在客户端安装yum install -y openssh-clients即可

目录
相关文章
|
运维 监控 Linux
Linux Rsync服务详解(二)——Rsync服务实战
Linux Rsync服务详解(二)——Rsync服务实战
363 1
|
网络协议
aws-vpc-对等连接(不同vpc之间的内网互通)
aws-vpc-对等连接(不同vpc之间的内网互通)
2111 0
aws-vpc-对等连接(不同vpc之间的内网互通)
|
容器 Docker 数据安全/隐私保护
阿里云开源 image-syncer 工具,容器镜像迁移同步的终极利器
为什么要做这个工具? 由于阿里云上的容器服务 ACK 在使用成本、运维成本、方便性、长期稳定性上大大超过公司自建自维护 Kubernets 集群,有不少公司纷纷想把之前自己维护 Kubernetes 负载迁移到阿里云 ACK 服务上。
|
缓存 Linux 开发工具
CentOS 7- 配置阿里镜像源
阿里镜像官方地址http://mirrors.aliyun.com/ 1、点击官方提供的相应系统的帮助 :2、查看不同版本的系统操作: 下载源1、安装wget yum install -y wget2、下载CentOS 7的repo文件wget -O /etc/yum.
263394 0
|
Linux iOS开发 MacOS
|
11月前
|
应用服务中间件 nginx Docker
配置Containerd运行时镜像加速器
containerd配置国内容器镜像加速器
4258 1
|
网络协议 Linux
如何在 Linux 中禁用 IPv6?
【5月更文挑战第2天】
2416 8
如何在 Linux 中禁用 IPv6?
|
存储 Linux
挂在mount报错can't read superblock修复过程
`can't read superblock`错误表明存在文件系统或硬件问题,解决这类问题需要先从软件层面尝试修复,无效时再考虑硬件替换。值得注意的是,数据备份对于防范这类突发故障至关重要,应定期进行数据备份,以最大限度减少数据丢失风险。
7760 3
|
数据采集 Web App开发 iOS开发
如何利用 Python 的爬虫技术获取淘宝天猫商品的价格信息?
本文介绍了使用 Python 爬虫技术获取淘宝天猫商品价格信息的两种方法。方法一使用 Selenium 模拟浏览器操作,通过定位页面元素获取价格;方法二使用 Requests 和正则表达式直接请求页面内容并提取价格。每种方法都有详细步骤和代码示例,但需注意反爬措施和法律法规。
|
监控 数据可视化 调度
ERP系统中的生产计划优化与生产效率提升解析
【7月更文挑战第25天】 ERP系统中的生产计划优化与生产效率提升解析
910 0