[systemd-devel] rsync output is not captured in the journal

Lennart Poettering lennart at poettering.net
Mon Jan 5 04:56:25 PST 2015


On Sun, 04.01.15 21:06, Igor Bukanov (igor at mir2.org) wrote:

> Hello,
> 
> I have a strange case when there is no output in the journal from
> rsync when the command is run from a service. This is on Fedora 21
> with systemd 217.
> 
> Consider the following trivial test unit:
> 
> # cat /etc/systemd/system/test.service
> [Service]
> ExecStart=/usr/bin/rsync -vv /etc/hostname /tmp
> StandardError=journal
> StandardOutput=journal

Note that these two lines are the implied default, and hence redundant.

> Type=oneshot
> 
> When I run it via
> 
> systemctl start test
> 
> I have no messages in the journal. journalctl -au test gives an empty output.

Hmm, quite possibly rsync has some logic built-in that checks whether
it is run with PID 1 as parent process, and then changes its logging
behaviour. On sysvinit that made some sense, but it certainly doesn't
on any other init system.

Please check if there's a logic for that in rsync somewhere!

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list