昨晚小版本上线,使用rsync往服务器上传文件时,client报如下异常:

@ERROR: auth failed on module backup

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

首先:检查server端和client端的用户名和密码确认都无误;

服务器端检查这个/etc/rsync.pass密码文件,

注:其它系统可能密码文件名字不一样可以在配置文件中搜索cat /etc/rsyncd.conf | grep -i secrets 来确认密码文件的名字

不建议用ps -ef | greep -i rsync 因为如果rsync被设置成守护进程启动的,进程只显示为xinetd,所以用ps的命令搜不到

然后:检查了服务器端/etc/rsyncd.conf 配置文件未发现异常,

再次:通过配置文件找到了log存放目录

$ cat /etc/rsyncd.conf | grep -i log

log file = /var/log/rsync.log

查看/var/log/rsync.log发现

2017/07/21 09:38:33 [31746] name lookup failed for xxx.xx.xxx.xx: Name or service not known
2017/07/21 09:38:33 [31746] connect from UNKNOWN (xxx.xx.xxx.xx)
2017/07/21 09:38:33 [31746] auth failed on module ci from unknown (xxx.xx.xxx.xx): missing secret for user "pesdfk"

google搜索一下,发现其它网友解决方案,在server的/etc/hosts里加上IP和主机名的映射,我没有采用该建议。因为这个系统一直是我在维护,上周还有版本上线

运行都正常。

主要还是围绕客户端的@ERROR: auth failed on module backup在猜想,肯定是用户验证出了异常。

又google了一下,看到有网友提示,server端rsync.pass文件的格式user:passwrod , 修改成user:passwrod后在client端重新上传文件正常。

奇怪的是之前一直都正常,而且rsync.pass上次修改日期是2016年。

附录:rsync常见问题及解决办法 (转载自:http://kkkkkk.blog.51cto.com/468162/1194202)

问题一:

@ERROR: chroot failed
rsync error: error starting client-server protocol (code 5) at main.c(1522) [receiver=3.0.3]

原因:
服务器端的目录不存在或无权限,创建目录并修正权限可解决问题。

问题二:
@ERROR: auth failed on module tee
rsync error: error starting client-server protocol (code 5) at main.c(1522) [receiver=3.0.3]

原因:
服务器端该模块(tee)需要验证用户名密码,但客户端没有提供正确的用户名密码,认证失败。
提供正确的用户名密码解决此问题。

问题三:
@ERROR: Unknown module ‘tee_nonexists’
rsync error: error starting client-server protocol (code 5) at main.c(1522) [receiver=3.0.3]

原因:
服务器不存在指定模块。提供正确的模块名或在服务器端修改成你要的模块以解决问题。

问题四:
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 to 218.107.243.2: No route to host (113)
rsync error: error in socket IO (code 10) at clientserver.c(104) [receiver=2.6.9]
原因:
对方没开机、防火墙阻挡、通过的网络上有防火墙阻挡,都有可能。关闭防火墙,其实就是把tcp udp的873端口打开。

问题六:
rsync error: error starting client-server protocol (code 5) at main.c(1524) [Receiver=3.0.7]
原因:
/etc/rsyncd.conf配置文件内容有错误。请正确核对配置文件。
问题七:
rsync: chown "" failed: Invalid argument (22)
原因:
权限无法复制。去掉同步权限的参数即可。(这种情况多见于Linux向Windows的时候)

问题八:
@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。掠过软连接文件。

问题九:
ERROR: module is read only
rsync error: syntax or usage error (code 1) at main.c(747) [receiver=2.6.8]
rsync: connection unexpectedly closed (4 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,将配置文件 read only = no

问题十:
cat /var/log/rsyncd.log
2011/12/14 11:58:37 [22377] name lookup failed for XX.XX.XX.XX: Name or service not known
2011/12/14 11:58:37 [22377] connect from UNKNOWN (XX.XX.XX.XX)
2011/12/14 11:58:37 [22377] rsync to html/ from unknown (XX.XX.XX.XX)
解决:需要在服务端这台机上上的/etc/hosts里面添加客户端机的ip和机器名

问题十一:

[root@Dell-R710 ~]# rsync -artuz -R --delete ./ 192.168.1.233::gex
rsync: failed to connect to 61.145.118.206: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(124) [sender=3.0.6]
解决:
一、查看防火墙
二、查看服务端是否开启守护进程
ps ax|grep rsync
rsync --daemon --config=/etc/rsyncd.conf

#####################################################################

问题1:
在client上遇到问题:
rsync -auzv --progress --password-file=/etc/rsync.pas root@192.168.133.128::backup /home/
rsync: could not open password file "/etc/rsync.pas": No such file or directory (2)
Password: 
@ERROR: auth failed on module backup
rsync error: error starting client-server protocol (code 5) at main.c(1506) [Receiver=3.0.7]

遇到这个问题:client端没有设置/etc/rsync.pas这个文件,而在使用rsync命令的时候,加了这个参数--
password-file=/etc/rsync.pas

问题2:
rsync -auzv --progress --password-file=/etc/rsync.pas root@192.168.133.128::backup /home/
@ERROR: auth failed on module backup
rsync error: error starting client-server protocol (code 5) at main.c(1506) [Receiver=3.0.7]
遇到这个问题:client端已经设置/etc/rsync.pas这个文件,里面也设置了密码111111,和服务器一致,但是
服务器段设置有错误,服务器端应该设置/etc/rsync.pas  ,里面内容root:111111 ,这里登陆名不可缺少

问题3:
rsync -auzv --progress --password-file=/etc/rsync.pas root@192.168.133.128::backup /home/
@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1506) [Receiver=3.0.7]

遇到这个问题,是因为服务器端的/home/backup  其中backup这个目录并没有设置,所以提示:chdir failed

问题4:
rsync: write failed on "/home/backup2010/wensong": No space left on device (28)
rsync error: error in file IO (code 11) at receiver.c(302) [receiver=3.0.7]
rsync: connection unexpectedly closed (2721 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [generator=3.0.7]
磁盘空间不够,所以无法操作。
可以通过df /home/backup2010 来查看可用空间和已用空间

问题5:网络收集问题
1、权限问题
类似如下的提示:rsync: opendir "/kexue" (in dtsChannel) failed: Permission denied (13)注意查看同步的目录权限是否为755
2、time out
rsync: failed to connect to 203.100.192.66: Connection timed out (110)
rsync error: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.5]
检查服务器的端口netstat –tunlp,远程telnet测试。

3、服务未启动
rsync: failed to connect to 10.10.10.170: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.5]
启动服务:rsync --daemon --config=/etc/rsyncd.conf

4、磁盘空间满
rsync: recv_generator: mkdir "/teacherclubBackup/rsync……" failed: No space left on device (28)
*** Skipping any contents from this failed directory ***

5、Ctrl+C或者大量文件
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(544) [receiver=3.0.5]
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(544) [generator=3.0.5]

6、xnetid启动
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.5]
查看rsync日志
rsync: unable to open configuration file "/etc/rsyncd.conf": No such file or directory
xnetid查找的配置文件位置默认是/etc下,根据具体情况创建软链接。例如:
ln -s /etc/rsyncd/rsyncd.conf /etc/rsyncd.conf
或者更改指定默认的配置文件路径,在/etc/xinetd.d/rsync配置文件中

rsync @ERROR: auth failed on module backup 解决思路及附录rsync常见问题及解决办法的更多相关文章

  1. RSYNC @ERROR: AUTH FAILED ON MODULE XXX 解决思路及附录RSYNC常见问题及解决办法

    使用rsync往服务器上传文件时,client报如下异常: @ERROR: auth failed on module XXX rsync error: error starting client-s ...

  2. srync:@ERROR: auth failed on module tee 的解决办法分析

    首先:检查server端和client端的用户名和密码确认都无误: 然后:检查了服务器端/etc/rsyncd.conf 配置文件未发现异常, 再次:通过配置文件找到了log存放目录 $ cat /e ...

  3. 解决rsync 同步auth failed on module问题

    今天在同步备份文件时遇到一个情况,以前正常的备份,在昨天突然同步备份文件失败了.于是开始检查原因..... 报错日志/var/log/rsyncd.log发现错误 // :: [] auth fail ...

  4. rsync auth failed on module xxx

    rsync 报错 "auth failed on module xxx", 一般有三种情况造成: 密码文件格式错误: 服务端密码文件的格式是: user:password 每个一行 ...

  5. rsync同步时报“auth failed on module”错误的可能原因

    关于这个auth失败的问题,有以下可能的情况:   1.密码输入错误: 请再次确认你登录用户的密码无误   2.secrets file格式错误: secrets file的文件格式是  upload ...

  6. error: RPC failed; curl 18 transfer closed with outstanding read data remaining的解决

    解决方案也是网上搜的,总结一下 一,加大缓存区git config --global http.postBuffer 524288000这个大约是500M二.少clone一些,–depth 1git ...

  7. Rsync服务常见问题及解决

    1. rsync服务端开启的iptables防火墙/selinux没关 [客户端的错误] No route to host [错误演示过程] [root@nfs01 tmp]# rsync -avz ...

  8. smtplib.SMTPAuthenticationError: (535, b'Error: authentication failed')解决办法

    raise SMTPAuthenticationError(code, resp) smtplib.SMTPAuthenticationError: (535, b'Error: authentica ...

  9. 【pymongo】连接认证 auth failed解决方法

    故事背景: 我在虚拟机(ip:192.168.xx.xx)上建立了一个mongo的数据库,里面已经存好了内容.里面的一个database叫做 "adb", 里面有个collecti ...

随机推荐

  1. 数据库分库分表(sharding)系列

    数据库分库分表(sharding)系列     目录; (一) 拆分实施策略和示例演示 (二) 全局主键生成策略 (三) 关于使用框架还是自主开发以及sharding实现层面的考量 (四) 多数据源的 ...

  2. jvm(一)类加载器

    1.jvm的生命周期结束的几种情况 a.执行了System.exit()方法 b.程序正常执行结束 c.程序在执行过程中遇到了异常或错误而异常终止 d.操作系统出现错误 2.类加载过程 加载:查找并加 ...

  3. 2018-2019-2 《网络对抗技术》Exp0 Kali安装 Week1 20165304

    下载镜像文件 在官网上下载好64位的镜像文件后,按照网上是教程进行安装,安装成功后截图如下 接下来是安装增强功能 按照教程安装增强功能后截图如下 设置共享文件 安装搜狗 在安装搜狗时遇到了安装失败的情 ...

  4. UE4 Creating 3D Widget Interaction

    https://docs.unrealengine.com/en-us/Engine/UMG/HowTo/InWorldWidgetInteraction

  5. 2017-11-10 Fr Oct 消参

    2017-11-04 Sa $ P(-3, 0) $ 在圆C $ (x-3)^2 + y^2 = 8^2 $ 内,动圆M与圆相切且过P点,求M点轨迹. 设切点 $ A(a, b) $,圆心 \(M(x ...

  6. CSS 图像高级 径向渐变

    径向渐变 径向渐变使用 radial-gradient 函数语法. 这个语法和线性渐变很类似, 可以指定渐变结束时的形状 以及它的大小. 默认来说,结束形状是一个椭圆形并且和容器的大小比例保持一致. ...

  7. python中文件处理--判断文件读取结束方法

    一.readline函数 按行遍历读取文件的方法,通过这个方法,readline() 每次只读取一行,通常比 .readlines() 慢得多.仅当没有足够内存可以一次读取整个文件时,才应该使用 .r ...

  8. centos7.4重置root密码

    1- 在启动grub菜单,选择编辑选项启动 2 - 按键盘e键,来进入编辑界面 3 - 找到Linux 16的那一行,将ro改为rw init=/sysroot/bin/sh 4 - 现在按下 Con ...

  9. day46 前端基础HTML5+CSS3

    编辑器 pycharm,sublime,hbuild,webstorm,atom 前端概念 广义:用户能看见并且交互的显示页面 狭义:运行在浏览器上的页面 学习的语言 html5 => (h5架 ...

  10. 关于pycharm有时候提取不了form表单POST提交的数据

    1.有可能标签没有name属性 2.name属性要放在第一个位置,放在末尾有时候会出现BUG导致识别不出,提取的值为None.