rsync: failed to connect to 服务器ip Connection timed out (110) 的错误原因

使用rsync进行服务器备份,出现如下错误

rsync: failed to connect to 118.31.65.241 (118.31.65.241): Connection timed out (110)
rsync error: error in socket IO (code 10) at clientserver.c(128) [Receiver=3.1.1]

出现这个错误的原因可能因为客户端或者服务端的防火墙开启,导致无法通信,可以设置规则放行 rsync(873端口) 或者直接关闭防火墙。

可以使用telnet测试下目标服务器的端口是否正常开启

telnet xxxxx 873

如未开启,将防火墙放行873端口

/sbin/iptables -I INPUT -p tcp --dport 873 -j ACCEPT
/etc/rc.d/init.d/iptables save

然后再使用rsync备份就没什么问题了。

参考地址:
http://www.jb51.net/article/31920.htm
https://shipengliang.com/software-exp/centos-rsync-failed-to-connect-to-x-x-x-x-no-route-to-host-113-%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95.html

如果您觉得本文对您有用,欢迎捐赠或留言~
微信支付
支付宝

发表评论

您的电子邮箱地址不会被公开。 必填项已用 * 标注