rsync error: error in socket IO (code 10) at clientserver.c(122) [sender=3.0.7]
Rsync error code 10 is a common error message that is triggered while working with rsync. Basically, it occurs when the rsync service is not running in the server.
As part of our Server Management Services for online service providers and website owners, we have seen several other causes for this error.
Today we’ll go through the top cause and fix for this rsync error.
Why does rsync operation ends with error 10?
Rsync is a command-line tool that allows local and remote file transfer. This is mostly used for taking backup, transferring files, etc.
But when the rsync tool is not installed/enabled in any of the servers during a remote transfer, rsync operations end with an error code 10.
More specifically, this error is triggered when both the servers are not able to establish a proper connection between them. At times lack of proper password-less authentication between the servers or firewall restrictions can also trigger this error.
Rsync is not enabled in the server
The most common reason for this error is rsync not running on the server, probably due to a reboot. To check if this is the case, you can run the following on the server that is supposed to reject the connection (destination):
$ systemctl list-unit-files |grep rsync rsync.service disabled
This indicates that rsync is disabled in the server. We could fix this error easily by enabling the rsync service.
$ sudo systemctl enable rsync.service Synchronizing state for rsync.service with sysvinit using update-rc.d... Executing /usr/sbin/update-rc.d rsync defaults Executing /usr/sbin/update-rc.d rsync enable
Once the service is enabled, the next step is to activate it. It can be done easily with the help of following commands:
$ sudo systemctl start rsync.service
This activates the service. Now we can check the service with:
$ systemctl |grep rsync rsync.service loaded active running fast remote file copy program daemon
Other common causes of rsync error 10
Apart from the reasons that we mentioned earlier some alternate reasons can also trigger the rsync error 10. These are basically those reasons that create a hindrance in establishing a secure connection between the two servers.
Firewall restrictions, low time out value of script, are a few among them. The clue about the exact reason can be obtained from the dmesg log. For instance, a sample log entry is shown below:
dmesg | grep rsync [85852.560086] Out of memory: Kill process 4242 (rsync) score 194 or sacrifice child [85852.562695] Killed process 4243 (rsync) total-vm:121948kB, anon-rss:65752kB, file-rss:4kB – Sparhawk
This confirms that the rsync service it getting terminated due to insufficient memory. The fix here would be to adjust the rsync parameters to reduce the memory usage or to increase the resource availability of the server.
[Need assistance to fix rsync errors? – We’ll help you.]
In short, rsync error code 10 occurs when rsync is not enabled/installed in the server. Today, we saw some other possible reasons for this error and how our Support Engineers fixed the rsync errors.