【集群架构中的故障集合】_nfs connection reset by peer

[12:41 root@backup ~]# rsync -avz /etc 176.16.1.31:/tmp
ssh: connect to host 176.16.1.31 port 22: Connection refused
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.2]

4.auth failed on module data

data模块认证错误(密码)

原因:
1.密码写错
2.密码文件不存在
3.密码文件权限不对
4.没有创建data这个目录

[root 16:15 @ backup ~]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::data
Password: 
@ERROR: auth failed on module data
rsync error: error starting client-server protocol (code 5) at main.c(1648) [sender=3.1.2]
原因:密码文件权限没有更改为600
[root 16:25 @ backup ~]# ll /etc/rsync.password 
-rw-r--r-- 1 root root 20 May 20 16:05 /etc/rsync.password

解决办法:更改文件权限位600
[root 16:25 @ backup ~]# chmod 600  /etc/rsync.password 
[root 16:25 @ backup ~]# ll /etc/rsync.password 
-rw------- 1 root root 20 May 20 16:05 /etc/rsync.password


5.Unknown module ‘data’ 未知的设备模块

没有权限

[17:45 root@nfs01 ~]# rsync -avz /etc/hostname rsync_backup@10.0.0.41::data --password-file=/etc/rsync.password
@ERROR: Unknown module 'data'
rsync error: error starting client-server protocol (code 5) at main.c(1648) [sender=3.1.2]


服务端查看rsyncd.conf ,准许哪些主机可以访问

hosts allow = 172.16.1.0/24
#hosts deny = 0.0.0.0/32

6.秘密文件

日志中
密码文件问题
查看日志的提示:

019/05/20 16:52:32 [15755] secrets file must be owned by root when running as root (see strict modes)
2019/05/20 16:52:32 [15755] auth failed on module data from backup (172.16.1.41) for rsync_backup: ignoring secrets file

 secrets file must be owned by root when running as root (see strict modes)

密码文件当root运行rsync的时候,必须属于root

[root@backup ~]# ll /etc/rsync.password 
-rw------- 1 rsync rsync 20 May 20 16:49 /etc/rsync.password

7.read错误:由对等方重置连接

配置文件错误

[root@backup ~]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::data
sending incremental file list
rsync: read error: Connection reset by peer (104)
rsync error: error in socket IO (code 10) at io.c(785) [sender=3.1.2]

8.密码文件不能是其他可访问的
rsync -avz /etc/sysconfig/ rsync_backup@172.16.1.91::backup --password-file=/etc/rsync.password  
ERROR: password file must not be other-accessible
rsync error: syntax or usage error (code 1) at authenticate.c(196) [sender=3.1.2]

9.未知模块’数据’

@ERROR:未知模块’数据’

2019/05/20 17:45:46 [10514] rsync denied on module data from UNKNOWN (10.0.0.31)

10.@ERROR: chdir failed

没有创建data备份这个目录

[20:35 root@backup ~]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::data
Password: 
@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1648) [sender=3.1.2

解决办法:

[20:35 root@backup ~]# mkdir -p /data
[20:38 root@backup ~]# chown rsync.rsync /data/
[20:39 root@backup ~]# ll -d /data/
drwxr-xr-x 2 rsync rsync 6 May 20 20:38 /data/
[20:39 root@backup ~]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::data
Password: 
sending incremental file list
hosts

sent 140 bytes  received 43 bytes  52.29 bytes/sec
total size is 158  speedup is 0.86

11.invalid uid rsync 无效的uid rsync

推送到的接收端可能没有rsync这个虚拟用户

[09:40 root@nfs01 ~]# rsync -avz /etc/profile rsync_backup@172.16.1.41::data --password-file=/etc/rsync.password 
@ERROR: invalid uid rsync
rsync error: error starting client-server protocol (code 5) at main.c(1648) [sender=3.1.2]

去接收端服务器看一下:

[09:41 root@backup ~]# id rsync
id: rsync: no such user   \\没有这个用户

12.getcwd: cannot directories

getcwd 命令无法定位到当前工作目录。一般来说是因为 cd 到了某个目录之后 rm 了这个目录,这时去执行某些 service 脚本的时候就会报 getcwd 错误。只需要 cd 到任何一个实际存在的目录下在执行命令即可。

[root@nfs01 /backup/172.16.1.31]# sh /tmp/rsync.sh 
shellinit: error retrieving current directory: getcwd: cannot directories: No such file or directory
/usr/bin/tar: Removing leading `/' from member names

#二、nfs

为了做好运维面试路上的助攻手,特整理了上百道 【运维技术栈面试题集锦】 ,让你面试不慌心不跳,高薪offer怀里抱!

这次整理的面试题,小到shell、MySQL,大到K8s等云原生技术栈,不仅适合运维新人入行面试需要,还适用于想提升进阶跳槽加薪的运维朋友。

本份面试集锦涵盖了

  • 174 道运维工程师面试题
  • 128道k8s面试题
  • 108道shell脚本面试题
  • 200道Linux面试题
  • 51道docker面试题
  • 35道Jenkis面试题
  • 78道MongoDB面试题
  • 17道ansible面试题
  • 60道dubbo面试题
  • 53道kafka面试
  • 18道mysql面试题
  • 40道nginx面试题
  • 77道redis面试题
  • 28道zookeeper

总计 1000+ 道面试题, 内容 又全含金量又高

  • 174道运维工程师面试题

1、什么是运维?

2、在工作中,运维人员经常需要跟运营人员打交道,请问运营人员是做什么工作的?

3、现在给你三百台服务器,你怎么对他们进行管理?

4、简述raid0 raid1raid5二种工作模式的工作原理及特点

5、LVS、Nginx、HAproxy有什么区别?工作中你怎么选择?

6、Squid、Varinsh和Nginx有什么区别,工作中你怎么选择?

7、Tomcat和Resin有什么区别,工作中你怎么选择?

8、什么是中间件?什么是jdk?

9、讲述一下Tomcat8005、8009、8080三个端口的含义?

10、什么叫CDN?

11、什么叫网站灰度发布?

12、简述DNS进行域名解析的过程?

13、RabbitMQ是什么东西?

14、讲一下Keepalived的工作原理?

15、讲述一下LVS三种模式的工作过程?

16、mysql的innodb如何定位锁问题,mysql如何减少主从复制延迟?

d、Varinsh和Nginx有什么区别,工作中你怎么选择?

7、Tomcat和Resin有什么区别,工作中你怎么选择?

8、什么是中间件?什么是jdk?

9、讲述一下Tomcat8005、8009、8080三个端口的含义?

10、什么叫CDN?

11、什么叫网站灰度发布?

12、简述DNS进行域名解析的过程?

13、RabbitMQ是什么东西?

14、讲一下Keepalived的工作原理?

15、讲述一下LVS三种模式的工作过程?

16、mysql的innodb如何定位锁问题,mysql如何减少主从复制延迟?

17、如何重置mysql root密码?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值