Bobcares

How to fix Rsync error: error in IPC code (code 14)

by | Jul 9, 2020

Rsync error: error in IPC code(code 14) often triggers during the copy of files from one server to another server. This happens due to reasons like SELinux restrictions or issues with the rsync command.

As a part of our Server Management Services, we help our Customers to fix rsync related errors regularly.

Let us today discuss the possible causes and fixes for this error.


 

What causes the Rsync error: error in IPC code (code 14)?

Often the transfer of files from one server to another using rsync can fail with the error message “Rsync error: error in IPC code (code 14)”.  The error in the debug.log would show:

The following command has failed:
stderr: rsync: Failed to exec ssh: Permission denied (13)
rsync error: error in IPC code (code 14) at pipe.c(84) [receiver=3.0.6]
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [receiver=3.0.6]

The exact part to stress out here would be the line above the rsync error. Here it states a permission denied error.

The common reasons for this Rsync error include

  • SELinux restrictions
  • Syntax errors
  • SSH client not installed

Let us now look at the solutions to fix this error.

 

How to fix the Rsync error: error in IPC code (code 14)?

The steps to fix this rsync error depends on the actual reason that triggers it. Let now look at the steps to follow to fix this error in different scenarios.

SELinux is enabled on the destination service node

Selinux is a Linux kernel security feature for access control. When SELinux is running in enforcing mode, it enforces the SELinux policy and denies access based on SELinux policy rules. We could cross-check the status of it using the command below:

#sestatus

It may output a result as shown below:

Rsync error: error in IPC code(code 14)

The result clearly states that SELinux is in enforcing mode. It could be a reason for the rsync to exit with this specific exit code. Thus we could disable SELinux temporarily and perform the transfer. After the completion of the file transfer, we could then revert the status to the enforcing mode

#setenforce 0  //Disables SELinux
#setenforce 1  //Change SELinux to enforcing mode

Also, note to reboot the server to apply changes.

Syntax errors

This rsync error can be triggered due to errors in the syntax used. For instance, the following command will trigger the rsync error in the given format

# rsync –progress -avzecP “ssh -p789” /path/from/source/ user@xxx.xxx.xxx.xxx:/path/to/destination/folder

rsync: Failed to exec cP: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(84) [sender=3.0.9]

 

This command has to be replaced as follows:

# rsync –progress -avzcP -e “ssh -p123” /path/from/source/ user@192.168.1.123:/path/to/destination/folder

or

# rsync –progress -avzcPe “ssh -p789” /path/from/source/ user@xxx.xxx.xxx.xxx:/path/to/destination/folder

 

Alternate reasons

Apart from the major reasons mentioned above the SSH connection for the file transfer through rsync may fail due to some additional reasons.

If SSH client is not installed in either of the machines, then the connection may not be completed properly. Thus it may trigger the error message. Fix here would be to ensure the install of openssh clients in the servers.

Another possible reason would be the insufficient permission of the user on the corresponding directory. For instance, if we are trying to transfer the files to a folder through a user with no write access on the specified folder, then it may trigger an access denied message with the corresponding error codes. Thus it would be a good idea to cross-check the permission of the user if you see this message.

[Need assistance to fix  Rsync error? We’ll help you.]
 

Conclusion

In short, Rsync error in IPC code (code 14) occurs due to reasons like SELinux restrictions, syntax error, insufficient permission etc. Today we discussed some tips that our Support Engineers follow to fix the Rsync error.

 

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.