You are not logged in.

#1 2018-01-05 19:04:22

sumerman
Member
Registered: 2017-12-22
Posts: 4

[SOLVED] systemd-timesyncd does not start

Hi all. I have Arch Linux installed on my computer at work without any
problems with systemd-timesyncd. I also have Arch and Gentoo (with systemd on both) installed
at home. On Gentoo, I have no problem with systemd-timesyncd. However,
on the Arch installation, after bootup, the command timedatectl
produces

[palsor@humphrey ~]$ sudo timedatectl
                      Local time: Fri 2018-01-05 13:29:30 EST
                  Universal time: Fri 2018-01-05 18:29:30 UTC
                        RTC time: Fri 2018-01-05 18:29:31
                       Time zone: EST5EDT (EST, -0500)
       System clock synchronized: yes
systemd-timesyncd.service active: no
                 RTC in local TZ: no

(The same command issued without sudo produces the same result.) Then
I checked the status:

[palsor@humphrey ~]$ sudo systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2018-01-05 13:10:11 EST; 21min ago
     Docs: man:systemd-timesyncd.service(8)
  Process: 450 ExecStart=/usr/lib/systemd/systemd-timesyncd (code=exited, status=238/STATE_DIRECTORY)
 Main PID: 450 (code=exited, status=238/STATE_DIRECTORY)

Jan 05 13:10:11 humphrey systemd[1]: systemd-timesyncd.service: Service has no hold-off time, scheduling restart.
Jan 05 13:10:11 humphrey systemd[1]: systemd-timesyncd.service: Scheduled restart job, restart counter is at 5.
Jan 05 13:10:11 humphrey systemd[1]: Stopped Network Time Synchronization.
Jan 05 13:10:11 humphrey systemd[1]: systemd-timesyncd.service: Start request repeated too quickly.
Jan 05 13:10:11 humphrey systemd[1]: systemd-timesyncd.service: Failed with result 'exit-code'.
Jan 05 13:10:11 humphrey systemd[1]: Failed to start Network Time Synchronization.

After futzing around, I gave the command

[palsor@humphrey ~]$ sudo /usr/lib/systemd/systemd-timesyncd 
Failed to change file owner: Success
Synchronized to time server 69.30.214.174:123 (0.arch.pool.ntp.org).

Then timedatectl gives the output

palsor@humphrey ~]timedatectl
                      Local time: Fri 2018-01-05 13:36:20 EST
                  Universal time: Fri 2018-01-05 18:36:20 UTC
                        RTC time: Fri 2018-01-05 18:36:20
                       Time zone: EST5EDT (EST, -0500)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

At this point when I go to the time.is website, the time is exact and everything runs just fine. Can anyone explain what the problem is? I'm suspecting the feedback from issuing the /usr/lib/systemd/systemd-timesyncd command "Failed to change file owner: Success" has something to do with the issue. Just a guess. Thanks in advance for your help.

Last edited by sumerman (2018-01-06 14:38:27)

Offline

#2 2018-01-05 19:18:23

loqs
Member
Registered: 2014-03-06
Posts: 17,195

Re: [SOLVED] systemd-timesyncd does not start

Welcome to the arch linux forums sumerman.  Seems somewhat similar to https://github.com/systemd/systemd/issues/7659
Edit:
Also what is the output of

# ls -lad /var/lib/private

and can you please follow Systemd#Diagnosing_problems_with_a_specific_service then post the journal output for the run of the service with log level debug.

Last edited by loqs (2018-01-05 21:01:14)

Offline

#3 2018-01-06 03:23:11

sumerman
Member
Registered: 2017-12-22
Posts: 4

Re: [SOLVED] systemd-timesyncd does not start

Thanks for the quick reply, loqs.
Here's the output you requested:

[palsor@humphrey ~]$ sudo ls -lad /var/lib/private
drwxr-xr-x 1 root root 14 Dec 17 12:36 /var/lib/private

And here's the journal output for the run of the service with log level debug:

[palsor@humphrey ~]$ sudo SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-timesyncd
Failed to change file owner: Success
Added new server 0.arch.pool.ntp.org.
Added new server 1.arch.pool.ntp.org.
Added new server 2.arch.pool.ntp.org.
Added new server 3.arch.pool.ntp.org.
systemd-timesyncd running as pid 1357
Selected server 0.arch.pool.ntp.org.
Resolving 0.arch.pool.ntp.org...
Resolved address 69.89.207.199:123 for 0.arch.pool.ntp.org.
Resolved address 45.127.113.2:123 for 0.arch.pool.ntp.org.
Resolved address 38.126.113.11:123 for 0.arch.pool.ntp.org.
Resolved address 66.228.42.59:123 for 0.arch.pool.ntp.org.
Selected address 69.89.207.199:123 of server 0.arch.pool.ntp.org.
Connecting to time server 69.89.207.199:123 (0.arch.pool.ntp.org).
Sent NTP request to 69.89.207.199:123 (0.arch.pool.ntp.org).
NTP response:
  leap         : 0
  version      : 4
  mode         : 4
  stratum      : 2
  precision    : 0.000000 sec (-23)
  root distance: 0.024704 sec
  reference    : n/a
  origin       : 1515204975.101
  receive      : 1515204974.314
  transmit     : 1515204974.314
  dest         : 1515204975.149
  offset       : -0.811 sec
  delay        : +0.049 sec
  packet count : 1
  jitter       : 0.000
  poll interval: 32
  adjust (jump): -0.811 sec
  status       : 8192 sync
  time now     : 1515204974.338
  constant     : 2
  offset       : +0.000 sec
  freq offset  : +0 (0 ppm)
interval/delta/delay/jitter/drift 32s/-0.811s/0.049s/0.000s/+0ppm
Synchronized to time server 69.89.207.199:123 (0.arch.pool.ntp.org).

Removed server 0.arch.pool.ntp.org.
Removed server 1.arch.pool.ntp.org.
Removed server 2.arch.pool.ntp.org.
Removed server 3.arch.pool.ntp.org.

And here is the output of

journalctl -xe

after setting the enviromental variable

SYSTEMD_LOG_LEVEL=debug
[palsor@humphrey ~]$ sudo systemctl stop systemd-timesyncd
[palsor@humphrey ~]$ sudo /lib/systemd/systemd-timesyncd  
Failed to change file owner: Success
Synchronized to time server 216.218.254.202:123 (0.arch.pool.ntp.org).

[palsor@humphrey ~]sudo journalctl -xe                  
Jan 05 22:07:45 humphrey sudo[1633]: pam_unix(sudo:session): session closed for user root
Jan 05 22:10:14 humphrey sudo[1644]:   palsor : TTY=pts/1 ; PWD=/home/palsor ; USER=root ; COMMAND=/bin/systemctl stop systemd-timesy
Jan 05 22:10:14 humphrey sudo[1644]: pam_unix(sudo:session): session opened for user root by palsor(uid=0)
Jan 05 22:10:14 humphrey sudo[1644]: pam_unix(sudo:session): session closed for user root
Jan 05 22:10:34 humphrey sudo[1647]:   palsor : TTY=pts/1 ; PWD=/home/palsor ; USER=root ; COMMAND=/lib/systemd/systemd-timesyncd
Jan 05 22:10:34 humphrey sudo[1647]: pam_unix(sudo:session): session opened for user root by palsor(uid=0)
Jan 05 22:11:06 humphrey sudo[1647]: pam_unix(sudo:session): session closed for user root
Jan 05 22:11:57 humphrey sudo[1653]:   palsor : TTY=pts/1 ; PWD=/home/palsor ; USER=root ; COMMAND=/bin/journalctl -xb
Jan 05 22:11:57 humphrey sudo[1653]: pam_unix(sudo:session): session opened for user root by palsor(uid=0)
Jan 05 22:12:31 humphrey sudo[1653]: pam_unix(sudo:session): session closed for user root
Jan 05 22:12:34 humphrey sudo[1658]:   palsor : TTY=pts/1 ; PWD=/home/palsor ; USER=root ; COMMAND=/bin/journalctl -xe
Jan 05 22:12:34 humphrey sudo[1658]: pam_unix(sudo:session): session opened for user root by palsor(uid=0)
Jan 05 22:14:21 humphrey sudo[1658]: pam_unix(sudo:session): session closed for user root
Jan 05 22:14:31 humphrey sudo[1688]:   palsor : TTY=pts/1 ; PWD=/home/palsor ; USER=root ; COMMAND=/lib/systemd/systemd-timesyncd
Jan 05 22:14:31 humphrey sudo[1688]: pam_unix(sudo:session): session opened for user root by palsor(uid=0)
Jan 05 22:14:38 humphrey sudo[1688]: pam_unix(sudo:session): session closed for user root
Jan 05 22:14:48 humphrey sudo[1691]:   palsor : TTY=pts/1 ; PWD=/home/palsor ; USER=root ; COMMAND=/bin/journalctl -xe
Jan 05 22:14:48 humphrey sudo[1691]: pam_unix(sudo:session): session opened for user root by palsor(uid=0)
Jan 05 22:15:51 humphrey sudo[1691]: pam_unix(sudo:session): session closed for user root
Jan 05 22:17:00 humphrey sudo[1698]:   palsor : TTY=pts/1 ; PWD=/home/palsor ; USER=root ; COMMAND=/bin/systemctl stop systemd-timesy
Jan 05 22:17:00 humphrey sudo[1698]: pam_unix(sudo:session): session opened for user root by palsor(uid=0)
Jan 05 22:17:00 humphrey sudo[1698]: pam_unix(sudo:session): session closed for user root
Jan 05 22:17:14 humphrey sudo[1701]:   palsor : TTY=pts/1 ; PWD=/home/palsor ; USER=root ; COMMAND=/lib/systemd/systemd-timesyncd
Jan 05 22:17:14 humphrey sudo[1701]: pam_unix(sudo:session): session opened for user root by palsor(uid=0)
Jan 05 22:17:19 humphrey sudo[1701]: pam_unix(sudo:session): session closed for user root

Hope this is useful. And correctly done!

Offline

#4 2018-01-06 03:43:54

sumerman
Member
Registered: 2017-12-22
Posts: 4

Re: [SOLVED] systemd-timesyncd does not start

Eureka! Thank you, loqs. Changing the permissions on /var/lib/private to 0700 did the trick as mentioned in https://github.com/systemd/systemd/issues/7659. Now I need to check the permissions on the directory on my Arch computer at work! Many thanks again.

Offline

#5 2018-01-06 04:05:17

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: [SOLVED] systemd-timesyncd does not start

Make sure you remember to mark your thread as solved by editing the first post and prepending [Solved] to the title.

Offline

#6 2019-04-27 01:21:25

wondertx
Member
Registered: 2018-08-10
Posts: 9

Re: [SOLVED] systemd-timesyncd does not start

Hope it fixes.
systemd-timesyncd fails to start after systemd 242.0-1 update

https://wiki.archlinux.org/index.php/Sy … 0-1_update

Offline

#7 2019-04-27 02:50:34

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: [SOLVED] systemd-timesyncd does not start

Since this problem was well over a year ago, it's totally unrelated.

Offline

#8 2019-04-27 02:54:21

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] systemd-timesyncd does not start

Don't necrobump: especially solved threads https://wiki.archlinux.org/index.php/Co … bumping.22


Closing


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB