Bobcares

Rsync error code 12 – How we figure it out?

by | Oct 7, 2019

Backups and file transferring is important for server management.

And Rsync is one of the best shots, but errors are always a setback.

Rsync error code 12 is a tricky error that occurs due to insufficient disk space, network errors and so on.

That is why at Bobcares, we often get requests to fix Rsync errors as a part of our Server Management Services.

Today, let’s see how our Support Engineers fix Rsync error code 12 for our customers.

 

Explaining Rsync error code 12

Rsync is one of the popular file synchronization tools. It is useful for both local and remote file transfer.

If the destination already contains the source file then the Rsync only copies the differences. This makes Rsync a faster file transfer option.

But, in many situations, the Rsync operation ends by showing the error message:

rsync error: error in rsync protocol data stream (code 12) at io.c(xxx).

So, why does the file transfer ends by showing an error code 12?

Usually, the reason for this varies from insufficient disk space to network errors, improper destination and so on.

Let’s now check on a few reasons and see how our Support Engineers fix them.

 

Causes and fixes for the Rsync error 12

Whenever a server operation ends up in error, the initial troubleshooting starts from the log file. In the case of Rsync, our Support Engineers always make sure to set up the log file right. As a result, the reason that leads to the error can be easily found out from teh log file.

The most common reasons for the Rsync error code 12 are:

 

1. Insufficient disk space

While trying to Rsync data from one server to another, one of our customers got the error code 12. Here, the user tried to transfer a large file.

So, our Support Engineers initially tried to transfer a small file. Since the file transfer was successful, we could infer that the disk space was insufficient in the first case.

Thus, we always recommend checking the disk space before transferring large files. For instance, the free disk space should be at least more than the size of the largest file.

 

2. Missing remote Rsync

In some cases, the remote side does not have Rsync installed. Also, the destination path specified does not exist. In both cases, the Rsync error 12 shows up.

For instance, one of our customers executed the command:

rsync -v -v -e 'ssh -p YY' ./testfile user@XXXXX:/home

Here, YY denotes the SSH port number.

This ended up in the error code 12.

Initially, our Dedicated Engineers made sure that ssh -p YY user@XXXXX works fine. Since this was working fine, we checked the Rsync in the remote end.

Rsync was found missing in the remote end. So, we installed it on the Ubuntu/Debian server using:

apt-get install rsync

That fixed the error and Rsync ran successfully.

 

3. Failure due to idle connection

Similarly, an idle connection can also show the error code 12 in remote file transfer.

In such situations, our Support Team always recommends using –timeout option in the Rsync command. Here, the Rsync sends keep-alive messages to the remote server to prevent a timeout.

We can also configure ssh to prevent timeout by setting a few parameters like KeepAlive, ServerAliveInterval, ServerAliveCountMax, etc.

 

[Having trouble in fixing Rsync errors? – We’ll help you.]

 

Conclusion

In short, Rsync error code 12 denotes ‘error in rsync protocol data stream’. Usually, this error occurs due to insufficient disk space, missing Rsync at the destination, idle connection timeout and so on. Today, we saw how our Support Engineers fix this error for our customers.

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";

5 Comments

  1. Victor Lee

    I restart rsync daemon process resolve this problem.

    Reply
  2. Daniel Doron

    Thanks. it was helpful. I was trying to rsync a docker running on AWS instance. the docker’s fingerprint changed and had to first ssh into the docker to have it updated.

    Reply
  3. Charles Roth

    Another cause for this problem is a mismatch between rsync and ssh. For example, on a Windows laptop with Cygwin, using the cygwin rsync with the Windows ssh will cause this error. A solution in that case is to make sure to install the cygwin ssh.

    Reply
    • Maheen Aboobakkar

      Thank you for the update Charles.

      Reply
  4. Sir Intellegence

    Another item you may want to add that I figured out since this was one of the top Google results. If you are on Windows, have Cygwin installed, and invoke rsync outside of a cygwin console, you will get a rsync 12 error since rsync is trying to use the wrong ssh. Apparently the window’s built in one doesn’t work with rsync and you need to use -e to pass the correct one.

    Reply

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.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF