Rsync导致网卡宕掉或机器宕机

Rsync导致网卡宕掉或机器宕机

时间:2013-09-25 09:09:16      作者:vaster      标签: Linux rsync      分类: Linux Linux服务

        今天早上一过来,运维同学就跟我说越南TLBB的日志备份服务器登录不上去了,经过查看,确实ping和telnet都不通,看着像机器宕掉的情况(当然,也有可能是网卡宕)。由于我们自己没有ilo,只能试着将机器重启,看能不能解决问题。结果重启之后,机器还是连不上,后来想起可能是防火墙重启后,规则有问题。于是只能将密码告诉越南合作方,要他们在机房登录,将防火墙停了后再看情况。防火墙停了之后,果然能登录了。

我从这边登录机器后,马上将密码改好,重新设置好规则,并存放到/etc/sysconfig/iptables文件中。再查看相关日志,在/var/log/message中发现以下所示日志:

Sep 24 08:43:18 YN_TLBB_LOG rsyncd[8966]: connect from UNKNOWN (192.168.132.67)
Sep 24 08:43:18 YN_TLBB_LOG rsyncd[8966]: rsync to 192.168.132.67 from unknown (192.168.132.67)
Sep 24 08:58:56 YN_TLBB_LOG rsyncd[8958]: rsync: writefd_unbuffered failed to write 4 bytes [generator]: Broken pipe (32)
Sep 24 08:58:56 YN_TLBB_LOG rsyncd[8958]: rsync error: error in rsync protocol data stream (code 12) at io.c(1119) [generator=2.6.8]
Sep 24 08:59:06 YN_TLBB_LOG rsyncd[8962]: rsync: writefd_unbuffered failed to write 4 bytes [generator]: No route to host (113)
Sep 24 08:59:08 YN_TLBB_LOG rsyncd[8966]: rsync: writefd_unbuffered failed to write 4 bytes [generator]: No route to host (113)
Sep 24 08:59:08 YN_TLBB_LOG rsyncd[8966]: rsync error: error in rsync protocol data stream (code 12) at io.c(1119) [generator=2.6.8]
Sep 24 09:04:58 YN_TLBB_LOG rsyncd[8944]: rsync: read error: Connection timed out (110)
Sep 24 09:04:58 YN_TLBB_LOG rsyncd[8944]: rsync error: error in rsync protocol data stream (code 12) at io.c(614) [receiver=2.6.8]Sep 24 09:04:58 YN_TLBB_LOG rsyncd[8944]: rsync: connection unexpectedly closed (425169 bytes received so far) [generator]
Sep 24 09:04:58 YN_TLBB_LOG rsyncd[8944]: rsync: connection unexpectedly closed (425169 bytes received so far) [generator]

在网上搜了一番,发现有人遇到类似的错误输出,但是他的日志有一行为Disconnecting: Corrupted MAC on input.这样可以初步断定为网卡问题。但是,我这里没有这样的提示,但是,猜测也可能是由于用rsync一时间传送太大量的日志导致网卡过载,造成这种问题。

所以在做日志同步时,还需要控制并发数,考虑更多系统性能相关的东东,防止此类事故再次发生。

发生rsync: writefd_unbuffered failed to write 1 bytes [sender] 的错误

有网友总结的规律如下:

1)日志文件越大,越有可能发生上述错误

2)rsync并发数量越多,越有可能发生上述错误

时间:2013-09-25 09:09:16      作者:vaster      标签: Linux rsync      分类: Linux Linux服务
  • 分享到:
  • 微博
  • QQ空间
  • 腾讯微博
  • 微信

Copyright © 2015 Gitblog | Proudly powered by Gitblog.