Rsync服务常见问题汇总讲解:
==================================
1. rsync服务端开启的iptables防火墙
  【客户端的错误】
   No route to host
  【错误演示过程】
   [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
   rsync: failed to connect to 172.16.1.41: No route to host (113)
   rsync error: error in socket IO (code 10) at clientserver.c(124) [sender=3.0.6]
  【异常问题解决】
   关闭rsync服务端的防火墙服务(iptables)
   [root@backup mnt]# /etc/init.d/iptables stop
   iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
   iptables: Flushing firewall rules:                         [  OK  ]
   iptables: Unloading modules:                               [  OK  ]
   [root@backup mnt]# /etc/init.d/iptables status
   iptables: Firewall is not running.

2. rsync客户端执行rsync命令错误
  【客户端的错误】
   The remote path must start with a module name not a /
  【错误演示过程】
   [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::/backup
   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]
  【异常问题解决】
   rsync命令语法理解错误,::/backup是错误的语法,应该为::backup(rsync模块)

3. rsync服务认证用户失败
  【客户端的错误】
   auth failed on module oldboy
  【错误演示过程】
   [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
   Password:
   @ERROR: auth failed on module backup
   rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]
  【异常问题解决】
   1. 密码真的输入错误,用户名真的错误
   2. secrets file = /etc/rsync.password指定的密码文件和实际密码文件名称不一致
   3. /etc/rsync.password文件权限不是600
   4. rsync_backup:123456密码配置文件后面注意不要有空格
   5. rsync客户端密码文件中只输入密码信息即可,不要输入虚拟认证用户名称

4. rsync服务位置模块错误
  【客户端的错误】
   Unknown module 'backup'   
  【错误演示过程】  
   [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
   @ERROR: Unknown module 'backup'
   rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]
  【异常问题解决】
   1. /etc/rsyncd.conf配置文件模块名称书写错误
   
5. rsync服务权限阻止问题
  【客户端的错误】
   Permission denied
  【错误演示过程】
   [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
   Password:
   sending incremental file list
   hosts
   rsync: mkstemp ".hosts.5z3AOA" (in backup) failed: Permission denied (13)
   sent 196 bytes  received 27 bytes  63.71 bytes/sec
   total size is 349  speedup is 1.57
   rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]   
  【异常问题解决】
   1. 共享目录的属主和属组不正确,不是rsync
   2. 共享目录的权限不正确,不是755
   
6. rsync服务备份目录异常
  【客户端的错误】
   chdir failed   
  【错误演示过程】   
   [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
   Password:
   @ERROR: chdir failed
   rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]
  【异常问题解决】  
   1. 备份存储目录没有建立
   2. 建立的备份存储目录和配置文件定义不一致
   说明:如果没有备份存储目录

7. rsync服务无效用户信息
  【客户端的错误】
   invalid uid rsync
  【错误演示过程】    
   [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
   Password:
   @ERROR: invalid uid rsync
   rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]
  【异常问题解决】  
   rsync服务对应rsync虚拟用户不存在了
    
8. 客户端已经配置了密码文件,但免秘钥登录方式,依旧需要输入密码
  【客户端的错误】
   password file must not be other-accessible
  【错误演示过程】
   [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup --password-file=/etc/rsync.password
   password file must not be other-accessible
   continuing without password file
   Password:
   sending incremental file list
   sent 26 bytes  received 8 bytes  5.23 bytes/sec
   total size is 349  speedup is 10.26
  【异常问题解决】  
   rsync客户端的秘钥文件也必须是600权限

9. rsync客户端连接慢问题
  【错误日志信息】
   错误日志输出
   2017/03/08 20:14:43 [3422] params.c:Parameter() - Ignoring badly formed line in configuration file: ignore errors
   2017/03/08 20:14:43 [3422] name lookup failed for 172.16.1.31: Name or service not known
   2017/03/08 20:14:43 [3422] connect from UNKNOWN (172.16.1.31)
   2017/03/08 20:14:43 [3422] rsync to backup/ from rsync_backup@unknown (172.16.1.31)
   2017/03/08 20:14:43 [3422] receiving file list
   2017/03/08 20:14:43 [3422] sent 76 bytes  received 83 bytes  total size 349
   正确日志输出
   2017/03/08 20:16:45 [3443] params.c:Parameter() - Ignoring badly formed line in configuration file: ignore errors
   2017/03/08 20:16:45 [3443] connect from nfs02 (172.16.1.31)
   2017/03/08 20:16:45 [3443] rsync to backup/ from rsync_backup@nfs02 (172.16.1.31)
   2017/03/08 20:16:45 [3443] receiving file list
   2017/03/08 20:16:45 [3443] sent 76 bytes  received 83 bytes  total size 349
  【异常问题解决】
   查看日志进行分析,编写rsync服务端hosts解析文件

10 rsync服务没有正确启动
  【错误日志信息】
   Connection refused (111)
  【错误演示过程】
   [root@管理机-muban ~]#  rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
   rsync: failed to connect to 172.16.1.41: Connection refused (111)
   rsync error: error in socket IO (code 10) at clientserver.c(124) [sender=3.0.6]
  【异常问题解决】
   [root@管理机-muban ~]# rsync --daemon
   [root@管理机-muban ~]# ss -lntup |grep rsync
   tcp    LISTEN     0      5                     :::873                  :::*      users:(("rsync",1434,5))
   tcp    LISTEN     0      5                      *:873                   *:*      users:(("rsync",1434,4))
   [root@管理机-muban ~]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
   Password:
   sending incremental file list
   hosts  
   sent 196 bytes  received 27 bytes  49.56 bytes/sec
   total size is 349  speedup is 1.57

rsync 问题总结的更多相关文章

  1. rsync 笔记之 list

    通过 rsync --list-only 可以列出可用的 文件/目录或者 module 下面两者的含义是完全不同的: rsync --list-only root@192.168.4.140: 使用系 ...

  2. 配置rsync服务,数据同步。

    这部分设计服务器端和客户端. [服务器端] 如果服务器没有安装rsync服务则使用yum安装rsync服务. yum install rsync 然后 vim /etc/xinetd.d/rsync ...

  3. 使用rsync同步目录

    本文描述了linux下使用rsync单向同步两个机器目录的问题. 使用rsync同步后可以保持目录的一致性(含删除操作). 数据同步方式 从主机拉数据 备机上启动的流程 同步命令: rsync -av ...

  4. linux rsync配置文件参数详解

    一.全局参数 在[moudle]之前的参数都是全局参数,也可以在全局参数下定义部分模块参数,这时该参数的值就是所有模块的默认值. port:指定后台程序使用的端口号,默认是873 logfile:指定 ...

  5. inotify+rsync实现实时同步部署

    1.1.架构规划 1.1.1架构规划准备 服务器系统 角色 IP Centos6.7 x86_64 NFS服务器端(NFS-server-inotify-tools) 192.168.1.14 Cen ...

  6. rsync同步架构

    1.1 rsync服务器端配置 1.1.1 查看服务器端rsync版本 1.1.2 创建配置文件 默认安装好rsync程序后,并不会自动创建rsync的主配置文件,需要手工来创建,其主配置文件为“/e ...

  7. rsync同步

    本地同步: rsync -avz /boot /test C/S架构: 远程同步:rsync+ssh 远程浏览器目录文件:rsync  用户@192.168.0.250:/boot 下行:rsync ...

  8. 使用rsync+inotify同步两台服务器文件

    目标功能:将B服务器文件同步到A服务器 A服务器rsyncd.conf配置 权限600 A服务器rsyncd.pas文件配置  权限600 同步文件路径 /data/wwwroot/shen/  权限 ...

  9. 通过rsync+inotify实现数据的实时备份

    我讲到过利用rsync实现数据的镜像和备份,但是要实现数据的实时备份,单独靠rsync还不能实现,本文就讲述下如何实现数据的实时备份. 一.rsync的优点与不足 与传统的cp.tar备份方式相比,r ...

  10. rsync参数及通信

    rsync 支持:  本机数据 <-------> 远程数据/本地数据 意义:  支持增量拷贝 --> 备份,节省带宽,时间   rsync -avL 一.常用选项  ******* ...

随机推荐

  1. CSS3中的新特性

    一.CSS3新属性 CSS3还不属于W3C标准,所以不同浏览器的支持程度也不相同,对于不同浏览器,写法也不同,不同内核的浏览器要加不同的前缀,如下: transform:rotate(9deg); - ...

  2. 用css画的一个图形 空心正方形+四边四色

    div{ width: 100px; height: 100px; border: 100px solid black; border-left-color:darkcyan; border-righ ...

  3. 关于MVC刷新页面会两次请求页面的原因

    遇到这个奇葩的问题刚开始关注点全放在后台了 ,以为后台哪个地方存在问题,找了半天一无所获之后才开始把问题关注点移到前端,通过不断的注释前台代码, 终于发现了问题,没想到是这个js导致的问题 因为的Vi ...

  4. 关于PHP中的Trait

    今天看PHP框架,看到Trait部分.没见过,好奇查了一下. PHP手册说的是解决多继承的问题.但是一般面向对象的语言中,解决多继承都是通过接口,PHP也有接口.貌似看上去Trait和Interfac ...

  5. 重拾C,一天一点点_7

    标准库,atof()函数包含在头文件<stdlib.h>中 /******把字符串s转换为相应的双精度浮点数*******/ #include <stdio.h> #inclu ...

  6. ubuntu14.10,安装ksnapshot(截图软件)

    Linux:ubuntu14.10 ubuntu软件中心对它的描述:KSnapshot captures images of the screen.  It can capture the whole ...

  7. 洛谷P3356 火星探险问题(费用流)

    传送门 和深海机器人问题差不多……看到有的大佬是用dp过的,强无敌…… 考虑一下,把每一个点拆点,分别是$A_i$和$B_i$,连一条容量为$inf$,费用为$0$的边,表示可以随便走.如果有石头,再 ...

  8. how to use windows azure market

    here is the sample. namespace USCrime2006and2007 { class Program { static void Main(string[] args) { ...

  9. flink学习笔记-数据源(DataSource)

    说明:本文为<Flink大数据项目实战>学习笔记,想通过视频系统学习Flink这个最火爆的大数据计算框架的同学,推荐学习课程: Flink大数据项目实战:http://t.cn/EJtKh ...

  10. 关于执行webdriver.Chrome; 报错WebDriverException: Message: unknown error: Element is not clickable at point (1085, 103)

    from selenium import webdriverfrom time import sleep dr = webdriver.Chrome() dr.get("http://pj1 ...