Getting error code 12 when using rsync with ssh in RHEL 8

Srijan Sivakumar ssivakum at
Mon Oct 5 17:40:35 UTC 2020

Hi SMEs,

I have been working on a geo replication solution and it uses rsync
internally. Recently when I was running the utility in RHEL 8, I started
facing seeing the following message :

Popen: command returned error cmd=rsync -aR0 --inplace --files-from=-
--super --stats --numeric-ids --no-implied-dirs --existing --xattrs --acls
--ignore-missing-args . -e ssh -oPasswordAuthentication=no
-oStrictHostKeyChecking=no -i /var/lib/glusterd/geo-replication/secret.pem
-p 22 -oControlMaster=auto -S
/tmp/gsyncd-aux-ssh-i1jbmu2r/89283d9f33e5cfb2abacb855f2e1242e.sock error=12

On checking the logs, I find that I'm receiving the following error :

2020/10/04 21:28:15 [2861944] rsync: connection unexpectedly closed (0
bytes received so far) [sender]
2020/10/04 21:28:15 [2861944] rsync error: error in rsync protocol data
stream (code 12) at io.c(226) [sender=3.1.3]

Now I have tried all the steps such as
1. Checking if the disk space if full ( it wasn't)
2. Recreate the key value pair and setup the password-less ssh scenario.

One observation I had was when I disabled the selinux enforcing, it started
to work. But even if it had been enforced, I did add an exception for
rsync_client and rsync_full_access which should have taken care of the
rsync operations.

I've tried the remedies mentioned in the manpages and even the internet but
the actual root cause still eludes me as to why it doesn't work in selinux
enforced mode if I had set the access.

Thank you in advance to anyone taking their time to answer this query :)

Thanks and Regards,


Associate Software Engineer

Red Hat


T: +91-9727532362 <>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the rsync mailing list