Bug 1637958 - systemd-timesyncd.service fails to start
Summary: systemd-timesyncd.service fails to start
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: ARMTracker
TreeView+ depends on / blocked
 
Reported: 2018-10-10 12:00 UTC by Vratislav Podzimek
Modified: 2019-05-28 18:56 UTC (History)
6 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2019-05-28 18:56:07 UTC


Attachments (Terms of Use)

Description Vratislav Podzimek 2018-10-10 12:00:10 UTC
Description of problem:
I am trying to use systemd-timesyncd.service instead of chronyd because it stores the time on reboot. However, it fails to start, I beleive due to all these new fancy, but broken, containery systemd features.

Version-Release number of selected component (if applicable):
systemd-238-9.git0e0aa59.fc28.src.rpm

How reproducible:
100%

Steps to Reproduce:
1. systemctl start systemd-timesyncd.service

Actual results:
Job for systemd-timesyncd.service failed because the control process exited with error code.
See "systemctl status systemd-timesyncd.service" and "journalctl -xe" for details.

Expected results:
service starting properly

Additional info:
Output from 'journalctl -u systemd-timesyncd.service':
Oct 10 13:57:14 localhost systemd[1]: Starting Network Time Synchronization...
Oct 10 13:57:14 localhost systemd[6411]: systemd-timesyncd.service: Failed to set up special execution directory in /var/lib: File exists
Oct 10 13:57:14 localhost systemd[6411]: systemd-timesyncd.service: Failed at step STATE_DIRECTORY spawning /usr/lib/systemd/systemd-timesyncd: File exists
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Main process exited, code=exited, status=238/STATE_DIRECTORY
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Failed with result 'exit-code'.
Oct 10 13:57:14 localhost systemd[1]: Failed to start Network Time Synchronization.
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Service has no hold-off time, scheduling restart.
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Scheduled restart job, restart counter is at 1.
Oct 10 13:57:14 localhost systemd[1]: Stopped Network Time Synchronization.
Oct 10 13:57:14 localhost systemd[1]: Starting Network Time Synchronization...
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Main process exited, code=exited, status=238/STATE_DIRECTORY
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Failed with result 'exit-code'.
Oct 10 13:57:14 localhost systemd[1]: Failed to start Network Time Synchronization.
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Service has no hold-off time, scheduling restart.
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Scheduled restart job, restart counter is at 2.
Oct 10 13:57:14 localhost systemd[1]: Stopped Network Time Synchronization.
Oct 10 13:57:14 localhost systemd[1]: Starting Network Time Synchronization...
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Main process exited, code=exited, status=238/STATE_DIRECTORY
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Failed with result 'exit-code'.
Oct 10 13:57:14 localhost systemd[1]: Failed to start Network Time Synchronization.
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Service has no hold-off time, scheduling restart.
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Scheduled restart job, restart counter is at 3.
Oct 10 13:57:14 localhost systemd[1]: Stopped Network Time Synchronization.
Oct 10 13:57:14 localhost systemd[1]: Starting Network Time Synchronization...
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Main process exited, code=exited, status=238/STATE_DIRECTORY
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Failed with result 'exit-code'.
Oct 10 13:57:14 localhost systemd[1]: Failed to start Network Time Synchronization.
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Service has no hold-off time, scheduling restart.
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Scheduled restart job, restart counter is at 4.
Oct 10 13:57:14 localhost systemd[1]: Stopped Network Time Synchronization.
Oct 10 13:57:14 localhost systemd[1]: Starting Network Time Synchronization...
Oct 10 13:57:14 localhost systemd[6424]: systemd-timesyncd.service: Failed to set up special execution directory in /var/lib: File exists
Oct 10 13:57:14 localhost systemd[6424]: systemd-timesyncd.service: Failed at step STATE_DIRECTORY spawning /usr/lib/systemd/systemd-timesyncd: File exists
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Main process exited, code=exited, status=238/STATE_DIRECTORY
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Failed with result 'exit-code'.
Oct 10 13:57:14 localhost systemd[1]: Failed to start Network Time Synchronization.
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Service has no hold-off time, scheduling restart.
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Scheduled restart job, restart counter is at 5.
Oct 10 13:57:14 localhost systemd[1]: Stopped Network Time Synchronization.
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Start request repeated too quickly.
Oct 10 13:57:14 localhost systemd[1]: systemd-timesyncd.service: Failed with result 'exit-code'.
Oct 10 13:57:14 localhost systemd[1]: Failed to start Network Time Synchronization.

Comment 1 Michal Schmidt 2018-10-10 14:19:28 UTC
I am seeing this too. The audit log shows a SELinux denial:

type=AVC msg=audit(1539180890.427:240): avc:  denied  { setattr } for  pid=1429 comm="(imesyncd)" name="timesync" dev="vda2" ino=655987 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=dir permissive=0

And systemd-timesyncd starts fine when booted with "enforcing=0".

Comment 2 Michal Schmidt 2018-10-10 14:24:36 UTC
The inode number from the AVC message corresponds to the directory /var/lib/private/systemd/timesync

# ls -li /var/lib/private/systemd
total 4
655987 drwxr-xr-x. 2 62583 62583 4096 Oct 10 16:10 timesync

Comment 3 Ben Cotton 2019-05-02 20:42:31 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Ben Cotton 2019-05-28 18:56:07 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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