Last update at :2024-06-19,Edit by888u
Snail encountered some problems the day before yesterday when he was trying to debug "Linux VPS uses Rsync to implement incremental backup of website files/server data synchronization". Because of the snail's habit, even if he sees a good technology compiled into a blog, he has to simply debug whether it is feasible. If it is not feasible, it must not be recorded, because this can easily cause misleading and unnecessary waste of time.
After deploying Rsync and testing whether the servers are synchronized, an error occurred.
rsync: failed to connect to xxx.xxx.xxx.xxx: No route to host (113)rsync error: error in socket IO (code 10) at clientsserver.c(124) [sender=3.0.6][ [email protected] ~]#
The reason for this problem is that there are iptables rules set in the server. We have two options, either close it or add allowed ports.
First, close iptables
service iptables stop
It is generally not recommended to turn it off directly, because some functions should not be turned on all the time and should be turned on as needed.
Second, enable port access
1. Check rules
vi /etc/sysconfig/iptables
2. Check the port
-A INPUT -p tcp -m state –state NEW -m tcp –dport 873 -j ACCEPT
Check whether port 873 is allowed in our rules. If there is a REJECT option, we need to add the above to the front, otherwise it will not take effect. Because the snail saw that it existed, but it didn't take effect, he advanced the rules.
Finally, after we save, the normal /etc/init.d/iptables restart will take effect. Then try it again.
Recommended site searches: Hong Kong vps host, Hong Kong server, Hong Kong vps, foreign vps server rental, Ministry of Industry and Information Technology website registration system, IP purchase, domain name transaction, Wanwang registered domain name, domain name query official website, registration-free space,
发表评论