Bug 1559286 - systemd-timesyncd fails to start: Failed to set up special execution directory in /var/lib: File exists
systemd-timesyncd fails to start: Failed to set up special execution director...
Status: NEW
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
28
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-03-22 04:02 EDT by Martin Pitt
Modified: 2018-07-18 04:42 EDT (History)
18 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Pitt 2018-03-22 04:02:38 EDT
Description of problem: systemd-timesyncd.service in Fedora 28 fails to start. Note that with SELinux enabled it already fails during dynamic user creation, I reported this in bug 1559281. But it still fails differently with SELinux off.

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

systemd-238-4.fc28.x86_64

How reproducible: Always


Steps to Reproduce:
1. setenforce 0
2. systemctl start systemd-timesyncd

Actual results:

● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2018-03-
 22 03:57:51 EDT; 3min 49s ago
     Docs: man:systemd-timesyncd.service(8)
  Process: 1541 ExecStart=/usr/lib/systemd/systemd-timesyncd (code=exited, status=238/STATE_DIRECTORY)
 Main PID: 1541 (code=exited, status=238/STATE_DIRECTORY)


Expected results: service starts successfully
Comment 1 Martin Pitt 2018-03-22 04:06:05 EDT
Corresponding journal entries:

systemd[1541]: systemd-timesyncd.service: Failed to set up special execution directory in /var/lib: File exists
systemd[1541]: systemd-timesyncd.service: Failed at step STATE_DIRECTORY spawning /usr/lib/systemd/systemd-timesyncd: File exists

The pid is a bit weird, shoudln't that be pid 1? This is all happening as root against the system systemd, no --user involved.
Comment 2 Cédric Bellegarde 2018-04-03 08:08:32 EDT
Same issue here on Fedora 28.
Comment 3 Cédric Bellegarde 2018-04-03 15:31:18 EDT
Working fix is here: https://github.com/systemd/systemd/issues/7659#issuecomment-352724406

It's permission issue in Fedora package.
Comment 4 Dominique Brazziel 2018-05-08 16:00:15 EDT
Here is what I get:

sctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2018-05-08 15:50:13 EDT; 8min ago
     Docs: man:systemd-timesyncd.service(8)
  Process: 15931 ExecStart=/usr/lib/systemd/systemd-timesyncd (code=exited, status=238/STATE_DIRECTORY)
 Main PID: 15931 (code=exited, status=238/STATE_DIRECTORY)

May 08 15:50:13 delldm51 systemd[1]: Starting Network Time Synchronization...
May 08 15:50:13 delldm51 systemd[1]: systemd-timesyncd.service: Main process exited, code=exited, status=238/STATE_DIRECTORY
May 08 15:50:13 delldm51 systemd[1]: systemd-timesyncd.service: Failed with result 'exit-code'.
May 08 15:50:13 delldm51 systemd[1]: Failed to start Network Time Synchronization.
May 08 15:50:13 delldm51 systemd[1]: systemd-timesyncd.service: Service has no hold-off time, scheduling restart.
May 08 15:50:13 delldm51 systemd[1]: systemd-timesyncd.service: Scheduled restart job, restart counter is at 5.
May 08 15:50:13 delldm51 systemd[1]: Stopped Network Time Synchronization.
May 08 15:50:13 delldm51 systemd[1]: systemd-timesyncd.service: Start request repeated too quickly.
May 08 15:50:13 delldm51 systemd[1]: systemd-timesyncd.service: Failed with result 'exit-code'.
May 08 15:50:13 delldm51 systemd[1]: Failed to start Network Time Synchronization.

What's chances of getting a fix in Fedora updates or updates-testing? I hate red messages when I am booting.
Comment 5 Scott Shambarger 2018-05-16 18:01:22 EDT
I tried the following (with selinux permissive)

# chmod 700 /var/lib/private
# systemctl start systemd-timesyncd

And the service started correctly.
Comment 6 Bruno Vernay 2018-06-08 06:19:50 EDT
The source would be this file https://src.fedoraproject.org/rpms/systemd/blob/f28/f/systemd.spec  ?

Where can we know or follow the progress on this? 
systemd mailing list ?  or Fedora package ??

Thanks
Comment 7 Bruno Vernay 2018-06-08 09:27:02 EDT
(In reply to Bruno Vernay from comment #6)
I made a very simple test to see if both bugs are resolved https://gitlab.com/BrunoVernay/dynustat 

Is there a way to help on this one?
Comment 8 David Demelier 2018-07-18 04:42:36 EDT
The chmod did the trick for me, how did you find that guys?

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