rsync error:No route to host

  1. rsync服务端开启的iptables防火墙
  2.  
  3. [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
  4.  
  5. rsync: failed to connect to 172.16.1.41: No route to host (113)
  6.  
  7. rsync error: error in socket IO (code 10) at clientserver.c(124) [sender=3.0.6]
  8.  
  9. 异常问题解决:
  10.  
  11. 关闭rsync服务端的防火墙服务(iptables
  12.  
  13. [root@backup mnt]# /etc/init.d/iptables stop
  14.  
  15. iptables: Setting chains to policy ACCEPT: filter [ OK ]
  16.  
  17. iptables: Flushing firewall rules: [ OK ]
  18.  
  19. iptables: Unloading modules: [ OK ]
  20.  
  21. [root@backup mnt]# /etc/init.d/iptables status
  22.  
  23. iptables: Firewall is not running.

ERROR: The remote path must start with a module name not a /

  1. rsync客户端执行rsync命令错误:
  2. 客户端的错误现象:
  3. [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::/backup
  4. ERROR: The remote path must start with a module name not a /
  5. rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]
  6. 异常问题解决:
  7. rsync命令语法理解错误,::/backup是错误的语法,应该为::backup(rsync模块)

@ERROR: auth failed on module backup

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

@ERROR: Unknown module 'backup'

  1. Unknown module 'backup'
  2.  
  3. [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
  4.  
  5. @ERROR: Unknown module 'backup'
  6.  
  7. rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

异常问题解决:

1. /etc/rsyncd.conf配置文件模块名称书写错误

2.配置文件中网段限制不对

Permission denied

情况1

  1. sync -avzP --delete /data/ rsync_backup@172.16.1.41::nfsbackup --password-file=/etc/rsync.password
  2.  
  3. sending incremental file list
  4.  
  5. ./
  6.  
  7. rsync: failed to set times on "." (in nfsbackup): Operation not permitted (1)
  8.  
  9. ett.txt
  10.  
  11. 324 100% 0.00kB/s 0:00:00 (xfer#1, to-check=13/15)
  12.  
  13. ett.txt_hard_link
  14.  
  15. 324 100% 316.41kB/s 0:00:00 (xfer#2, to-check=12/15)
  16.  
  17. oldboyedu/
  18.  
  19. rsync: recv_generator: mkdir "oldboyedu" (in nfsbackup) failed: Permission denied (13)

情况2

  1. [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
  2.  
  3. Password:
  4.  
  5. sending incremental file list
  6.  
  7. hosts
  8.  
  9. rsync: mkstemp ".hosts.5z3AOA" (in backup) failed: Permission denied (13)
  10.  
  11. sent 196 bytes received 27 bytes 63.71 bytes/sec
  12.  
  13. total size is 349 speedup is 1.57
  14.  
  15. rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]
  16.  
  17. 异常问题解决:
  18.  
  19. 1. 共享目录的属主和属组不正确,不是rsync
  20.  
  21. 2. 共享目录的权限不正确,不是755

chdir failed    

  1. [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
  2.  
  3. Password:
  4.  
  5. @ERROR: chdir failed
  6.  
  7. rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]
  8.  
  9. 异常问题解决:
  10.  
  11. 1. 备份存储目录没有建立
  12.  
  13. 2. 建立的备份存储目录和配置文件定义不一致
  14.  
  15. [root@backup backup]# /etc/init.d/xinetd restart
  16.  
  17. shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
  18.  
  19. Stopping xinetd: [ OK ]
  20.  
  21. Starting xinetd: shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
  22.  
  23. [ OK ]
  24.  
  25. 说明:如果没有备份存储目录,xinetd服务都不能正确启动

invalid uid rsync

  1. [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
  2.  
  3. Password:
  4.  
  5. @ERROR: invalid uid rsync
  6.  
  7. rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]
  8.  
  9. 异常问题解决:
  10.  
  11. rsync服务对应rsync虚拟用户不存在了

continuing without password file

客户端已经配置了密码文件,但免秘钥登录方式,依旧需要输入密码

  1. password file must not be other-accessible
  2.  
  3. [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup --password-file=/etc/rsync.password
  4.  
  5. password file must not be other-accessible
  6.  
  7. continuing without password file
  8.  
  9. Password:
  10.  
  11. sending incremental file list
  12.  
  13. sent 26 bytes received 8 bytes 5.23 bytes/sec
  14.  
  15. total size is 349 speedup is 10.26
  16.  
  17. 异常问题解决:
  18.  
  19. rsync客户端的秘钥文件也必须是600权限

rsync客户端连接慢问题

  1. 错误日志输出
  2.  
  3. 2017/03/08 20:14:43 [3422] params.c:Parameter() - Ignoring badly formed line in configuration file: ignore errors
  4.  
  5. 2017/03/08 20:14:43 [3422] name lookup failed for 172.16.1.31: Name or service not known
  6.  
  7. 2017/03/08 20:14:43 [3422] connect from UNKNOWN (172.16.1.31)
  8.  
  9. 2017/03/08 20:14:43 [3422] rsync to backup/ from rsync_backup@unknown (172.16.1.31)
  10.  
  11. 2017/03/08 20:14:43 [3422] receiving file list
  12.  
  13. 2017/03/08 20:14:43 [3422] sent 76 bytes received 83 bytes total size 349
  14.  
  15. 正确日志输出
  16.  
  17. 2017/03/08 20:16:45 [3443] params.c:Parameter() - Ignoring badly formed line in configuration file: ignore errors
  18.  
  19. 2017/03/08 20:16:45 [3443] connect from nfs02 (172.16.1.31)
  20.  
  21. 2017/03/08 20:16:45 [3443] rsync to backup/ from rsync_backup@nfs02 (172.16.1.31)
  22.  
  23. 2017/03/08 20:16:45 [3443] receiving file list
  24.  
  25. 2017/03/08 20:16:45 [3443] sent 76 bytes received 83 bytes total size 349
  26.  
  27. 异常问题解决:
  28.  
  29. 查看日志进行分析

rsync服务没有正确启动Connection refused (111)

  1. [root@oldboy-muban ~]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
  2.  
  3. rsync: failed to connect to 172.16.1.41: Connection refused (111)
  4.  
  5. rsync error: error in socket IO (code 10) at clientserver.c(124) [sender=3.0.6]
  6.  
  7. 解决 rsync服务没开启
  8.  
  9. [root@oldboy-muban ~]# rsync --daemon
  10.  
  11. [root@oldboy-muban ~]# ss -lntup |grep rsync
  12.  
  13. tcp LISTEN 0 5 :::873 :::* users:(("rsync",1434,5))
  14.  
  15. tcp LISTEN 0 5 *:873 *:* users:(("rsync",1434,4))
  16.  
  17. [root@oldboy-muban ~]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
  18.  
  19. Password:
  20.  
  21. sending incremental file list
  22.  
  23. hosts
  24.  
  25. sent 196 bytes received 27 bytes 49.56 bytes/sec
  26.  
  27. total size is 349 speedup is 1.57

rsync错误的更多相关文章

  1. rsync错误日志

    问题一: @ERROR: chroot failed rsync error: error starting client-server protocol (code 5) at main.c(152 ...

  2. 【Linux】rsync错误解析

    rsync: Failed to exec ssh: No such file or directory (2) rsync error: error in IPC code (code 14) at ...

  3. Linux下rsync daemon模式下的错误汇总

    一.前言:最近学习服务环境搭建,遇到了许多大大小小的问题,不过还好,经过我的一通努力终于都解决了,所以分享出来给自己留个纪念,同时也希望能帮助学习中的朋友. 二.环境:两台服务器环境相同 1 [roo ...

  4. Inotify+Rsync实现Linux服务器文件同步

    做这个功能的时候遇到了好多坑,在此感谢一下这篇博客 http://kerry.blog.51cto.com/172631/734087/  ,大家参照这篇博客就能实现该功能. 另外如果想详细了解一下的 ...

  5. Rsync备份服务

    一.Rsync 原理图 二.Rsync 原理描述 2.1:什么是Rsync Rsync是备份的一款软件,它可以实现全量备份.增量备份,也可以在不改变内容.属性的情况下进行同步备份,端口默认是873 2 ...

  6. 【Rsync实战】Rsync 备份的配置与管理

    一.Rsync 基本概述 rsync 是一款开源的备份工具,可以在不同主机之间进行同步,可实现全量备份与增量备份,因此非常适合用于架构集中式备份或异地备份等应用. rsync 官方地址: rsync ...

  7. 【CentOS】Linux日常管理

    /////////////////////////目录///////////////////////////////////////// 一.日常监控指标相关 1.监控系统状态命令 2.查看系统进程 ...

  8. Owasp Top 10 Security Risks for 2014

    A1-互联网泄密事件/撞库攻击 以大量的用户数据为基础,利用用户相同的注册习惯(相同的用户名和密码),尝试登陆其它的网站.2011年,互联网泄密事件引爆了整个信息安全 界,导致传统的用户+密码认证的方 ...

  9. lesson - 15 Linux系统日常管理4

    内容概要:1. rsync 命令格式rsync [OPTION]... SRC  DESTrsync [OPTION]... SRC  [USER@]HOST:DESTrsync [OPTION].. ...

随机推荐

  1. 使 Firefox 和 Vivaldi 只在新标签页显示书签栏

    Firefox 新建 ~/.mozilla/firefox/rre9emvh.default/chrome/userChrome.css (大概不同人的 rre9emvh.default 目录会有不同 ...

  2. JAVA高级编程(数据源datasource)

    数据源:通过jdbc连接数据库,多建立几条连接放在数据源里面.可以设置数据源的最大连接数,同时活跃的连接数,最少空闲的连接数,能够同时接收处理的连接数等等. dbcp数据源 需要的jar包: comm ...

  3. 这两天的pwn学习总结

    总是一会儿切到那里,一会儿切到那里,要明确一条主线,就是buu的题,而不是按着什么视频教程还有linux和python教程去学习.那样效率比较低. 一切为了写wp为本,不胡乱点击就是提高效率的最好办法 ...

  4. 全球定位IP位置 2018(离线版)

    球定位IP位置 2018(离线版) 这次写的软件使用Python写的,所以体积可能有点大 我特地写了GUI打包成了Exe可执行文件,方便小白使用== 只要输入目标ip就能显示目标所在的国家城市和经纬度 ...

  5. js实现深度拷贝

    js实现拷贝,使用普通赋值对象,在操作其中一个对象值的时候,另一个也会更改,不符合需求 因此引入深度拷贝,以下为实现深度拷贝的几种法: Object.assign // 合并多个对象 var targ ...

  6. input文件类型上传,或者作为参数拼接的时候注意的问题!

    1.ajax请求参数如果为文本类型,直接拼接即可.如果为file类型就需要先获取文件信息 2.获取文件信息: HTML代码: <div class="form-group"& ...

  7. 模板语法(DOM与Vue数据绑定)

    Vue.js使用了基于HTML的模板语法,允许开发者声明式的将DOM绑定至底层Vue实例的数据. 插值 文本:{{ }}数据绑定最常见的形式就是使用Mustache语法(双大括号)的文本插值,解释为普 ...

  8. CentOS7虚拟机配置、Hadoop搭建、wordCount DEMO运行

    安装虚拟机 最开始先安装虚拟机,我是12.5.7版本,如果要跟着我做的话,版本最好和我一致,不然后面可能会出一些莫名其妙的错误,下载链接如下(注册码也在里面了): 链接:https://pan.bai ...

  9. 算法竞赛入门经典——读书笔记day1

    1-1:整数值用%d输出,实数用%f输出. 1-2:整数/整数=整数,浮点数/浮点数=浮点数. 1-3:scanf中的占位符和变量的数据类型应一一对应,且每个变量前需要加&符号. 1-4:在算 ...

  10. Windows驱动开发-符号链接和设备名

    windows下的设备是以"\Device\[设备名]”形式命名的. 例如磁盘分区的C盘,D盘的设备名称就是 "\Device\HarddiskVolume2” "\De ...