RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1082496 - socket activation for rsync doesn't work
Summary: socket activation for rsync doesn't work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rsync
Version: 7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Luboš Uhliarik
QA Contact: Jaroslav Aster
Jana Heves
URL:
Whiteboard:
: 1180317 (view as bug list)
Depends On:
Blocks: 1104634 1110706 1191020 1205796 1247270
TreeView+ depends on / blocked
 
Reported: 2014-03-31 07:58 UTC by Karel Srot
Modified: 2015-11-19 12:20 UTC (History)
9 users (show)

Fixed In Version: rsync-3.0.9-17.el7
Doc Type: Known Issue
Doc Text:
The rsync utility cannot be run as a socket-activated service because the rsyncd@.service file is missing from the rsync package. Consequently, the "systemctl start rsyncd.socket" command does not work. However, running rsync as a daemon by executing the "systemctl start rsyncd.service" command works as expected.
Clone Of:
Environment:
Last Closed: 2015-11-19 12:20:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2120 0 normal SHIPPED_LIVE rsync bug fix update 2015-11-19 10:51:36 UTC

Description Karel Srot 2014-03-31 07:58:58 UTC
Description of problem:

rsync cannot be started via socket. This is already tracked in Fedora bug 1047236.

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. disable rsyncd.service and start rsyncd.socket
2. execute rsync command
3.

Actual results:
connection refused

Expected results:
rsync works

Comment 1 Karel Srot 2014-03-31 08:00:47 UTC
broken package: rsync-3.0.9-15.el7

Comment 3 Pavel Šimerda (pavlix) 2014-03-31 08:28:26 UTC
Looks like we basically need the rsyncd@.service file:

diff --git a/rsyncd@.service b/rsyncd@.service
new file mode 100644
index 0000000..89f9621
--- /dev/null
+++ b/rsyncd@.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=fast remote file copy program daemon
+ConditionPathExists=/etc/rsyncd.conf
+
+[Service]
+EnvironmentFile=/etc/sysconfig/rsyncd
+ExecStart=/usr/bin/rsync --daemon --no-detach "$OPTIONS"
+StandardInput=socket

Comment 4 Aaron Howell 2014-08-11 04:28:12 UTC
We have put this file in as a work around while waiting for this official fix:

$ cat /etc/systemd/system/rsyncd\@.service
[Unit]
Description=fast remote file copy program daemon
ConditionPathExists=/etc/rsyncd.conf

[Service]
EnvironmentFile=/etc/sysconfig/rsyncd
ExecStart=/usr/bin/rsync --daemon --no-detach "$OPTIONS"
StandardInput=socket

We noticed that the whole system started crawling to a halt after a period of time - in troubleshooting there are a lot of failed rsync processes piling up
$ systemctl 
rsyncd.0.1:873-10.1.1.1:19886.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19887.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19888.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19889.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19898.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19899.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19903.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19905.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19907.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19912.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19914.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19915.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19916.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19917.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19918.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19919.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19922.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19924.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19934.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19935.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19937.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19938.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19942.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19944.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19945.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19959.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19960.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19961.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19962.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19963.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19964.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19965.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19967.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19968.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19969.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19970.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19971.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19972.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19973.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19974.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19975.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19976.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19977.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19978.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19979.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19980.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19981.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19982.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19983.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19984.service                                    loaded failed failed    fast remote file copy program daemon
rsyncd.0.1:873-10.1.1.1:19985.service                                    loaded failed failed    fast remote file copy program daemon

This is caused by this particular host not being on the "hosts allow = " line in /etc/rsyncd.conf causing rsync to exit with a nonzero status - which systemd then marks as failed.

The fix is to either use the systemd service file to acknowledge or ignore the return status code
Acknowledge - use "SuccessExitStatus" - however I'm not sure of the return codes that are fine to use as successful exits
So I have ignored it completely which you do by prefixing the command for ExecStart with a hyphen.
ExecStart=-/usr/bin/rsync --daemon --no-detach "$OPTIONS"

If you are going to start including this file, might want to make sure it does not cause issues with the exit codes of rsync.

Comment 5 Karel Srot 2015-01-27 12:35:43 UTC
postponing to 7.2

Comment 10 Karel Srot 2015-04-20 14:35:46 UTC
*** Bug 1180317 has been marked as a duplicate of this bug. ***

Comment 11 Jaroslav Aster 2015-06-03 12:39:56 UTC
Hi,

I can confirm that rsyncd\@.service suggested by Aaron works. Exactly I used this:

[Unit]
Description=fast remote file copy program daemon
ConditionPathExists=/etc/rsyncd.conf

[Service]
EnvironmentFile=/etc/sysconfig/rsyncd
ExecStart=-/usr/bin/rsync --daemon --no-detach "$OPTIONS"
StandardInput=socket

[Install]
WantedBy=multi-user.target

It is copy of rsyncd.service + StandardInput=socket and '-' before /usr/bin/rsync.

Comment 15 errata-xmlrpc 2015-11-19 12:20:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2120.html


Note You need to log in before you can comment on or make changes to this bug.