Rsync 常见错误及解决方法
由于阿里云SLB不提供ECS间的数据同步服务,如果部署在SLB后端ECS上的应用服务是无状态的,那么可以通过独立的ECS或RDS服务来存储数据;如果部署在SLB后端ECS上的应用服务是有状态的,那么需要确保这些ECS上的数据是同步的。
我们通过Rsync来实现多个ECS之间的数据同步。
问题 @ERROR: chroot failed
@ERROR: chroot failed rsync error: error starting client-server protocol (code 5) at main.c(1503) [receiver=3.0.6]
原因:
服务器端的目录不存在或无权限。
解决办法:
创建目录并修正权限可解决问题。
问题 skipping non-regular file
receiving incremental file list
skipping non-regular file “vendor/bin/doctrine”
skipping non-regular file “vendor/bin/doctrine.php”
sent 1990 bytes received 489209 bytes 327466.00 bytes/sec total size is 182515746 speedup is 371.57
原因:
source源文件有软链接。
解决方法:
修改为 rsync -va,其中 -a == -rlptgoD (no -H,-A,-X) 或者 rsync -rvltOD 也可以。
解决后:
receiving incremental file list
vendor/bin/doctrine -> ../doctrine/orm/bin/doctrine
vendor/bin/doctrine.php -> ../doctrine/orm/bin/doctrine.php
sent 1998 bytes received 489279 bytes 327518.00 bytes/sec total size is 182515746 speedup is 371.51
问题@ERROR: module is read only
sending incremental file list
ERROR: module is read only
rsync error: syntax or usage error (code 1) at main.c(866) [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) [sender=3.0.6]
原因:
source源服务器端权限设置read为only只读权限。
解决方法:
read only = false
问题@ERROR: auth failed on module tee
@ERROR: auth failed on module tee rsync error: error starting client-server protocol (code 5) at main.c(1522) [receiver=3.0.6]
原因:
服务器端该模块(tee)需要验证用户名密码,但客户端没有提供正确的用户名密码,认证失败。
解决方法:
提供正确的用户名密码解决此问题。
问题 @ERROR: Unknown module ‘tee_nonexists’
@ERROR: Unknown module ‘tee_nonexists’ rsync error: error starting client-server protocol (code 5) at main.c(1522) [receiver=3.0.6]
原因:
服务器不存在指定模块。
解决方法:
提供正确的模块名或在服务器端修改成你要的模块以解决问题。
问题 password file must not be other-accessible
password file must not be other-accessible
continuing without password file
Password:
原因:
这是因为rsyncd.pwd rsyncd.secrets的权限不对,应该设置为600。
解决方法:
chmod 600 rsyncd.pwd
问题 rsync: failed to connect No route to host
rsync: failed to connect to 192.168.1.10: No route to host (113) rsync error: error in socket IO (code 10) at clientserver.c(104) [receiver=3.0.6]
原因:
对方没开机、防火墙阻挡、通过的网络上有防火墙阻挡,都有可能。
解决方法:
在iptables 中开放该端口,语句如下:
iptables -I INPUT -p tcp –dport 873 -j ACCEPT
rsync默认端口873,其实就是把tcp udp的873端口打开。
问题 rsync error: error starting client-server protocol
rsync error: error starting client-server protocol (code 5) at main.c(1524) [Receiver=3.0.6]
原因:
/etc/rsyncd.conf配置文件内容有错误。请正确核对配置文件。
问题 rsync: chown “” failed: Invalid argument (22)
rsync: chown “” failed: Invalid argument (22)
原因:
权限无法复制。去掉同步权限的参数即可。(这种情况多见于Linux向Windows的时候)
问题 @ERROR: daemon security issue — contact admin
@ERROR: daemon security issue — contact admin rsync error: error starting client-server protocol (code 5) at main.c(1530) [sender=3.0.6]
原因:
同步的目录里面有权限不足的软连接文件,需要服务器端的/etc/rsyncd.conf打开use chroot = yes。
问题 rsync: read error: Connection reset by peer (104)
rsync: read error: Connection reset by peer (104) rsync error: error in rsync protocol data stream (code 12) at io.c(794) [receiver=3.0.6]
解决:很大可能是服务器端没有开启 rsync 服务,开启服务。
问题 @ERROR: failed to open lock file
@ERROR: failed to open lock file rsync error: error starting client-server protocol (code 5) at main.c(1495) [receiver=3.0.6]
解决:配置文件 rsync.conf 中添加 lock file = rsyncd.lock 即可解决。
Rsync 常见错误及解决方法的更多相关文章
- centos linux 系统日常管理4 scp,rsync,md5sum,sha1sum,strace ,find Rsync 常见错误及解决方法 第十七节课
centos linux 系统日常管理4 scp,rsync,md5sum,sha1sum,strace ,find Rsync 常见错误及解决方法 第十七节课 rsync可以增量同步,scp不行 ...
- Servlet常见错误及解决方法
常见错误及解决方法 1. 404产生的原因为Web服务器(容器)根据请求地址找不到对应资源,以下情况都会出现404的错误提示: 输入的地址有误(应用名大小写不正确,名称拼写不正确) 在web.xml文 ...
- IIS7常见错误及解决方法
IIS7常见错误及解决方法 问题一:HTTP 错误 500.19 - Internal Server Error 无法访问请求的页面,因为该页的相关配置数据无效. 详细错误信息模块 IIS We ...
- 微信jssdk常见错误及解决方法
调用config 接口的时候传入参数 debug: true 可以开启debug模式,页面会alert出错误信息.以下为常见错误及解决方法: invalid url domain当前页面所在域名与使用 ...
- WCF项目中出现常见错误的解决方法:基础连接已经关闭: 连接被意外关闭
在我们开发WCF项目的时候,常常会碰到一些莫名其妙的错误,有时候如果根据它的错误提示信息,一般很难定位到具体的问题所在,而由于WCF服务的特殊性,调试起来也不是那么方便,因此往往会花费不少时间来进行跟 ...
- cmd常见错误及解决方法
[英文] Bad command or file name [译文] 错误的命令或文件名 错误原因和解决: 这大概是大家最常见到的错误提示了,它的意思是输入的命令无效.当输入的命令既不是DOS内部命令 ...
- jmeter常见错误及解决方法
jmeter常见错误: 错误一: Response code: Non HTTP response code: java.net.SocketTimeoutException Response m ...
- Android 源码编译及常见错误及解决方法
最近要往arm开发板上移植android系统,大大小小的问题遇到了太多太多,都是泪啊.本人初接触嵌入式开发,对问题的根源不是太了解,不过好在每解决一个问题,便记录一下.话不多说,正式罗列问题: hos ...
- VS 编程常见错误及解决方法
1. VS2013 无法打开包括文件:“cv.h"等一些头文件 解决方法: cv.h是build\include文件夹下的头文件,所在文件夹位置是D:\Program Files (x86) ...
随机推荐
- IDEA在同一窗口导入多个项目
在同一窗口打开多个项目 1. 当前窗口: 2. 3. 选择import module即可.然后一直点击next导入OK即可. 同一窗口目录下创建多个项目 1.File→New→Module 2.Ja ...
- flask基本介绍及虚拟环境
Flask Flask诞生于2010年,是Armin ronacher(人名)用 Python 语言基于 Werkzeug 工具箱编写的轻量级Web开发框架. Flask 本身相当于一个内核,其他几乎 ...
- Elasticsearch 5.4.3实战--Java API调用:索引mapping创建
因为项目开发使用的是Java语言, 项目的开发架构是Spring MVC+ maven的jar包管理, 所以今天重点说说ES 5.4.3 的Java API的源码实战 1. pom.xml文件增加依 ...
- Python换行符问题:\r\n还是\n?
今天写一个Python脚本去读取一个txt文件时,发现一个很有趣的现象: 如果这个文件是用atom编辑器写的,发现换行符是'\r'.这样一来去逐行读取数据就失效了,因为用open函数 去打开该文件re ...
- python3 - 默认参数为列表
默认参数的坑 定义一个函数,传入一个list,添加一个end再返回 1 2 3 def add_end(L=[]): L.append('END') return L 正常调用时,结 ...
- 如何在 Linux 中查看进程占用的端口号【转】
对于 Linux 系统管理员来说,清楚某个服务是否正确地绑定或监听某个端口,是至关重要的.如果你需要处理端口相关的问题,这篇文章可能会对你有用. 端口是 Linux 系统上特定进程之间逻辑连接的标识, ...
- HttpResonse 要记得关闭
写了一个小程序,要识别网站上的图片,用到HttpRequest发请求,HttpResponse接受返回数据.刚开始循环可以跑两个,但是总是提示超时.后来查资料发现,在Http协议中,规定了同个Http ...
- 无线桥接(WDS)如何设置?
一.WDS使用介绍 无线桥接(WDS)可以将多台无线路由器通过无线方式互联,从而将无线信号扩展放大.无线终端在移动过程中可以自动切换较好的信号,实现无线漫游. 本文指导将TL-WR740N当作副路由器 ...
- 题解-ZeroJudge-c686 高斯符號
Problem ZeroJudge Solution 考慮到\(\lfloor \frac {km}n\rfloor\)等同於\(km\)整除\(n\),換種表示方法就是\(km\)減去\(km\)模 ...
- HashMap多线程put后get为null和多线程put的时候可能导致元素丢失
一.多线程put后get为null 源码定位 void transfer(Entry[] newTable) { Entry[] src = table; int newCapacity = newT ...