the service seems to stopped at somepoint. Here is the output:
systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
Drop-In: /usr/lib/systemd/system/systemd-timesyncd.service.d
└─disable-with-time-daemon.conf
Active: failed (Result: start-limit-hit) since Tue 2022-06-21 03:05:57 CEST; 4h 17min ago
Docs: man:systemd-timesyncd.service(8)
Process: 1658 ExecStart=/lib/systemd/systemd-timesyncd (code=exited, status=0/SUCCESS)
Main PID: 1658 (code=exited, status=0/SUCCESS)
Status: "Shutting down..."
Jun 21 03:05:56 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 03:05:56 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 03:05:56 openhab3 systemd-timesyncd[1658]: Synchronized to time server for the first time Jun 21 03:05:57 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 03:05:57 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 03:05:57 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 03:05:57 openhab3 systemd[1]: systemd-timesyncd.service: Start request repeated too quickly.
Jun 21 03:05:57 openhab3 systemd[1]: systemd-timesyncd.service: Failed with result 'start-limit-hit'.
Jun 21 03:05:57 openhab3 systemd[1]: Failed to start Network Time Synchronization.
Jun 21 03:05:52 openhab3 systemd-timesyncd[1621]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 03:05:53 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 03:05:53 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 03:05:53 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 03:05:53 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 03:05:53 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 03:05:53 openhab3 systemd-timesyncd[1641]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 03:05:56 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 03:05:56 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 03:05:56 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 03:05:56 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 03:05:56 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 03:05:56 openhab3 systemd-timesyncd[1658]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 03:05:57 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 03:05:57 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 03:05:57 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 03:05:57 openhab3 systemd[1]: systemd-timesyncd.service: Start request repeated too quickly.
Jun 21 03:05:57 openhab3 systemd[1]: systemd-timesyncd.service: Failed with result 'start-limit-hit'.
Jun 21 03:05:57 openhab3 systemd[1]: Failed to start Network Time Synchronization.
Jun 21 07:26:21 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 07:26:21 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 07:26:21 openhab3 systemd-timesyncd[12984]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 07:32:55 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 07:32:55 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 07:32:55 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 07:32:55 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 07:32:55 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 07:32:55 openhab3 systemd-timesyncd[13245]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 07:32:55 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 07:32:55 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 07:32:55 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 07:32:55 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 07:32:55 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 07:32:56 openhab3 systemd-timesyncd[13264]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 07:37:58 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 07:37:58 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 07:37:58 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 07:37:58 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 07:37:58 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 07:37:58 openhab3 systemd-timesyncd[13463]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 07:37:58 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 07:37:58 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 07:37:58 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 07:37:58 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 07:37:59 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 07:37:59 openhab3 systemd-timesyncd[13482]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 07:46:37 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 07:46:37 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 07:46:37 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 07:46:37 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 07:46:37 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 07:46:37 openhab3 systemd-timesyncd[13808]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 07:46:37 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 07:46:37 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 07:46:37 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 07:46:38 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 07:46:38 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 07:46:38 openhab3 systemd-timesyncd[13828]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 07:52:58 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 07:52:58 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 07:52:58 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 07:52:58 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 07:52:58 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 07:52:58 openhab3 systemd-timesyncd[14070]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 07:52:59 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 07:52:59 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 07:52:59 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 07:52:59 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 07:52:59 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 07:52:59 openhab3 systemd-timesyncd[14089]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 08:01:21 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 08:01:21 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 08:01:21 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 08:01:21 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 08:01:21 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 08:01:21 openhab3 systemd-timesyncd[14404]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 08:01:21 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 08:01:21 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 08:01:21 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 08:01:21 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 08:01:22 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 08:01:22 openhab3 systemd-timesyncd[14425]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 08:05:59 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 08:05:59 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 08:05:59 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 08:05:59 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 08:06:00 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 08:06:00 openhab3 systemd-timesyncd[14603]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 08:06:00 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 08:06:00 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 08:06:00 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 08:06:01 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 08:06:01 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 08:06:01 openhab3 systemd-timesyncd[14623]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 08:06:03 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 08:06:03 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 08:06:03 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 08:06:03 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 08:06:04 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 08:06:04 openhab3 systemd-timesyncd[14639]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 08:06:04 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 08:06:04 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 08:06:04 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 08:06:04 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 08:06:04 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 08:06:04 openhab3 systemd-timesyncd[14658]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 08:06:07 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 08:06:07 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 08:06:07 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 08:06:07 openhab3 systemd[1]: Starting Network Time Synchronization...
Jun 21 08:06:08 openhab3 systemd[1]: Started Network Time Synchronization.
Jun 21 08:06:08 openhab3 systemd-timesyncd[14678]: Synchronized to time server for the first time [xx.xx.xx.xx]:123 (fritz.box).
Jun 21 08:06:08 openhab3 systemd[1]: Stopping Network Time Synchronization...
Jun 21 08:06:08 openhab3 systemd[1]: systemd-timesyncd.service: Succeeded.
Jun 21 08:06:08 openhab3 systemd[1]: Stopped Network Time Synchronization.
Jun 21 08:06:08 openhab3 systemd[1]: systemd-timesyncd.service: Start request repeated too quickly.
Jun 21 08:06:08 openhab3 systemd[1]: systemd-timesyncd.service: Failed with result 'start-limit-hit'.
Jun 21 08:06:08 openhab3 systemd[1]: Failed to start Network Time Synchronization.
Seems like a bug that should be reported on GitHub. I’m happy to do it, but it looks like y’all have invested a lot of effort in troubleshooting and could probably define the problem better than I could.’
No please. GitHub isn’t there to request help with debugging, please don’t open issues unless you analyzed the issue and can prove it is a bug in some openHABian component.
(and even if it turns out to be a bug it’s unlikely to be an openHABian one as we just use the OS service so openHABian Github is likely the wrong location to address this anyway).
A quick Google search yields the following. Worth a try to adapt that to systemd-timesynd and see if it helps.
Thanks for the hint. Sorry for the GitHub - I thought there were enough of us experiencing the problem for it to be beyond what we basic users can deal with.
I looked at the link you provided. If I read it correctly (and I’m not a Linux/Debian expert at all), it is talking about problems that occur on start up (boot). That is not the case for me. It starts fine.
I can see in journalctl that the Network Time Synchronization is stopping and starting frequently:
Nov 29 12:54:18 openhab-midway.hsd1.ut.comcast.net systemd-timesyncd[20649]: Initial synchronization to time server 38.229.52.9:123 (0.debian.pool.ntp.org).
Nov 29 12:54:20 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Nov 29 12:54:20 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Nov 29 12:54:20 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Nov 29 12:54:20 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Nov 29 12:54:20 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Nov 29 12:54:21 openhab-midway.hsd1.ut.comcast.net systemd-timesyncd[20672]: Initial synchronization to time server 72.30.35.89:123 (0.debian.pool.ntp.org).
Nov 29 12:54:22 openhab-midway.hsd1.ut.comcast.net tailscaled[7516]: Accept: TCP{100.107.124.2:8080 > 100.65.3.2:41276} 230 tcp non-syn
Nov 29 12:54:23 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Nov 29 12:54:23 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Nov 29 12:54:23 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Nov 29 12:54:23 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Nov 29 12:54:23 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Nov 29 12:54:23 openhab-midway.hsd1.ut.comcast.net systemd-timesyncd[20692]: Initial synchronization to time server 45.79.111.167:123 (0.debian.pool.ntp.org).
Nov 29 12:54:26 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Nov 29 12:54:26 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Nov 29 12:54:26 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Nov 29 12:54:26 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Nov 29 12:54:26 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Nov 29 12:54:26 openhab-midway.hsd1.ut.comcast.net systemd-timesyncd[20711]: Initial synchronization to time server 17.253.2.123:123 (0.debian.pool.ntp.org).
Nov 29 12:54:28 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Nov 29 12:54:28 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Nov 29 12:54:28 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Nov 29 12:54:28 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Nov 29 12:54:28 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Nov 29 12:54:28 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Nov 29 12:54:28 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Nov 29 12:54:28 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Nov 29 12:54:29 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Nov 29 12:54:29 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Nov 29 12:54:29 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Nov 29 12:54:29 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Nov 29 12:54:29 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Nov 29 12:54:29 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Nov 29 12:54:30 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Nov 29 12:54:30 openhab-midway.hsd1.ut.comcast.net systemd-timesyncd[20772]: Initial synchronization to time server 72.30.35.89:123 (0.debian.pool.ntp.org).
Nov 29 12:54:30 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Nov 29 12:54:30 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Nov 29 12:54:30 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Nov 29 12:54:30 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Start request repeated too quickly.
Nov 29 12:54:30 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Failed with result 'start-limit-hit'.
Nov 29 12:54:30 openhab-midway.hsd1.ut.comcast.net systemd[1]: Failed to start Network Time Synchronization.
I found that there are UNIT parameters StartLimitIntervalSec=interval and StartLimitBurst=burst that you can use to control the limit driven shutdown, but I’m hesitant to mess with something I don’t really understand. Is the frequent starting and stopping of the Network Time Synchronization normal?
I appreciate any suggestions for further research.
Well, it fixes a race condition of dbus and systemd-timesyncd which may have ongoing effects also long after boot. Putting this up won’t hurt.
Changing intervals won’t help.
Find out how to increase log output from timesyncd first. Add these to the systemd config file where that’s starting timesyncd. That should hopefully give you more details (in journalctl output) to analyze why it stops. That’s what you need to find out.
You can restart systemd-timesyncd in debug mode and watch for the messages for issues:
sudo systemctl stop systemd-timesyncd SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-timesyncd
The service had failed, so I started it using the debug command.
openhabian@openhab:~ $ systemctl -a --failed
UNIT LOAD ACTIVE SUB DESCRIPTION
â—Ź systemd-timesyncd.service loaded failed failed Network Time Synchronization
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
1 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.
openhabian@openhab:~ $ SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-timesyncd
Directory "/var/lib/systemd/timesync" already exists, but is owned by 100:102 (1000:115 was requested), refusing.
Failed to create state directory, ignoring: File exists
Failed to get link NTP servers: No data available
Bus bus-api-timesync: changing state UNSET → OPENING
Bus bus-api-timesync: changing state OPENING → AUTHENTICATING
Added new server 0.debian.pool.ntp.org.
Added new server 1.debian.pool.ntp.org.
Added new server 2.debian.pool.ntp.org.
Added new server 3.debian.pool.ntp.org.
systemd-timesyncd running as pid 28087
Selected server 0.debian.pool.ntp.org.
Resolving 0.debian.pool.ntp.org...
Bus bus-api-timesync: changing state AUTHENTICATING → HELLO
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0 signature=n/a error-name=n/a error-message=n/a
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=RequestName cookie=2 reply_cookie=0 signature=su error-name=n/a error-message=n/a
Got message type=method_return sender=org.freedesktop.DBus destination=:1.1664 path=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 signature=s error-name=n/a error-message=n/a
Bus bus-api-timesync: changing state HELLO → RUNNING
Got message type=signal sender=org.freedesktop.DBus.Local destination=n/a path=/org/freedesktop/DBus/Local interface=org.freedesktop.DBus.Local member=Connected cookie=4294967295 reply_cookie=0 signature=n/a error-name=n/a error-message=n/a
Got message type=signal sender=org.freedesktop.DBus destination=:1.1664 path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAcquired cookie=2 reply_cookie=0 signature=s error-name=n/a error-message=n/a
Got message type=error sender=org.freedesktop.DBus destination=:1.1664 path=n/a interface=n/a member=n/a cookie=3 reply_cookie=2 signature=s error-name=org.freedesktop.DBus.Error.AccessDenied error-message=Connection ":1.1664" is not allowed to own the service "org.freedesktop.timesync1" due to security policies in the configuration file
Unable to request name, failing connection: Connection ":1.1664" is not allowed to own the service "org.freedesktop.timesync1" due to security policies in the configuration file
Bus bus-api-timesync: changing state RUNNING → CLOSING
Bus bus-api-timesync: changing state CLOSING → CLOSED
Resolved address 173.0.48.220:123 for 0.debian.pool.ntp.org.
Resolved address 38.229.54.9:123 for 0.debian.pool.ntp.org.
Resolved address 74.6.168.73:123 for 0.debian.pool.ntp.org.
Resolved address 64.111.99.224:123 for 0.debian.pool.ntp.org.
Selected address 173.0.48.220:123 of server 0.debian.pool.ntp.org.
Connecting to time server 173.0.48.220:123 (0.debian.pool.ntp.org).
Sent NTP request to 173.0.48.220:123 (0.debian.pool.ntp.org).
NTP response:
leap : 0
version : 4
mode : 4
stratum : 2
precision : 0.000000 sec (-23)
root distance: 0.096130 sec
reference : n/a
origin : 1669860127.870
receive : 1669860127.961
transmit : 1669860127.961
dest : 1669860127.928
offset : +0.062 sec
delay : +0.059 sec
packet count : 1
jitter : 0.000
poll interval: 32
adjust (slew): +0.062 sec
Failed to call clock_adjtime(): Operation not permitted
interval/delta/delay/jitter/drift 32s/+0.062s/0.059s/0.000s/+0ppm
Synchronized to time server for the first time 173.0.48.220:123 (0.debian.pool.ntp.org).
Sent NTP request to 173.0.48.220:123 (0.debian.pool.ntp.org).
NTP response:
leap : 0
version : 4
mode : 4
stratum : 2
precision : 0.000000 sec (-23)
root distance: 0.096603 sec
reference : n/a
origin : 1669860159.978
receive : 1669860160.070
transmit : 1669860160.070
dest : 1669860160.042
offset : +0.061 sec
delay : +0.063 sec
packet count : 2
jitter : 0.023
poll interval: 32
adjust (slew): +0.061 sec
Failed to call clock_adjtime(): Operation not permitted
interval/delta/delay/jitter/drift 32s/+0.061s/0.063s/0.023s/+0ppm
Sent NTP request to 173.0.48.220:123 (0.debian.pool.ntp.org).
NTP response:
leap : 0
version : 4
mode : 4
stratum : 2
precision : 0.000000 sec (-23)
root distance: 0.097092 sec
reference : n/a
origin : 1669860192.228
receive : 1669860192.321
transmit : 1669860192.321
dest : 1669860192.289
offset : +0.062 sec
delay : +0.060 sec
packet count : 3
jitter : 0.058
poll interval: 32
adjust (slew): +0.062 sec
Failed to call clock_adjtime(): Operation not permitted
interval/delta/delay/jitter/drift 32s/+0.062s/0.060s/0.058s/+0ppm
^[[1;2B
I will now investiage the “Failed to call clock_adjtime():Operation not permitted” warning.
Initial Internet searches make me think it might be permission related, but I’m not sure, and will keep digging.
If I use sudo w/o a -u parameter (I think this means running as root, but I’m not sure), it seems to run just fine, without the Failed to call message.
openhabian@openhab:~ $ sudo SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-timesyncd
[sudo] password for openhabian:
Failed to get link NTP servers: No data available
Bus bus-api-timesync: changing state UNSET → OPENING
Bus bus-api-timesync: changing state OPENING → AUTHENTICATING
Added new server 0.debian.pool.ntp.org.
Added new server 1.debian.pool.ntp.org.
Added new server 2.debian.pool.ntp.org.
Added new server 3.debian.pool.ntp.org.
systemd-timesyncd running as pid 7506
Selected server 0.debian.pool.ntp.org.
Resolving 0.debian.pool.ntp.org...
Bus bus-api-timesync: changing state AUTHENTICATING → HELLO
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0 signature=n/a error-name=n/a error-message=n/a
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=RequestName cookie=2 reply_cookie=0 signature=su error-name=n/a error-message=n/a
Got message type=method_return sender=org.freedesktop.DBus destination=:1.1802 path=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 signature=s error-name=n/a error-message=n/a
Bus bus-api-timesync: changing state HELLO → RUNNING
Got message type=signal sender=org.freedesktop.DBus.Local destination=n/a path=/org/freedesktop/DBus/Local interface=org.freedesktop.DBus.Local member=Connected cookie=4294967295 reply_cookie=0 signature=n/a error-name=n/a error-message=n/a
Got message type=signal sender=org.freedesktop.DBus destination=:1.1802 path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAcquired cookie=2 reply_cookie=0 signature=s error-name=n/a error-message=n/a
Got message type=signal sender=org.freedesktop.DBus destination=:1.1802 path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAcquired cookie=3 reply_cookie=0 signature=s error-name=n/a error-message=n/a
Got message type=method_return sender=org.freedesktop.DBus destination=:1.1802 path=n/a interface=n/a member=n/a cookie=4 reply_cookie=2 signature=u error-name=n/a error-message=n/a
Successfully acquired requested service name.
Resolved address 91.236.251.14:123 for 0.debian.pool.ntp.org.
Resolved address 212.26.18.43:123 for 0.debian.pool.ntp.org.
Resolved address 196.10.52.58:123 for 0.debian.pool.ntp.org.
Resolved address 91.209.0.17:123 for 0.debian.pool.ntp.org.
Selected address 91.236.251.14:123 of server 0.debian.pool.ntp.org.
Connecting to time server 91.236.251.14:123 (0.debian.pool.ntp.org).
Sent NTP request to 91.236.251.14:123 (0.debian.pool.ntp.org).
NTP response:
leap : 0
version : 4
mode : 4
stratum : 2
precision : 0.000000 sec (-22)
root distance: 0.036522 sec
reference : n/a
origin : 1670079231.584
receive : 1670079230.147
transmit : 1670079230.147
dest : 1670079231.735
offset : -1.513 sec
delay : +0.151 sec
packet count : 1
jitter : 0.000
poll interval: 32
adjust (jump): -1.513 sec
status : 8192 sync
time now : 1670079230.223
constant : 2
offset : +0.000 sec
freq offset : +243704 (+3 ppm)
interval/delta/delay/jitter/drift 32s/-1.513s/0.151s/0.000s/+3ppm
Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/timesync1 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=3 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Synchronized to time server for the first time 91.236.251.14:123 (0.debian.pool.ntp.org).
Sent NTP request to 91.236.251.14:123 (0.debian.pool.ntp.org).
NTP response:
leap : 0
version : 4
mode : 4
stratum : 2
precision : 0.000000 sec (-22)
root distance: 0.037010 sec
reference : n/a
origin : 1670079262.294
receive : 1670079262.371
transmit : 1670079262.371
dest : 1670079262.448
offset : -0.000 sec
delay : +0.154 sec
packet count : 2
jitter : 0.000
poll interval: 64
adjust (slew): -0.000 sec
status : 8193 sync
time now : 1670079262.448
constant : 2
offset : -0.000 sec
freq offset : +243704 (+3 ppm)
interval/delta/delay/jitter/drift 64s/-0.000s/0.154s/0.000s/+3ppm
Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/timesync1 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=4 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Sent NTP request to 91.236.251.14:123 (0.debian.pool.ntp.org).
NTP response:
leap : 0
version : 4
mode : 4
stratum : 2
precision : 0.000000 sec (-22)
root distance: 0.037971 sec
reference : n/a
origin : 1670079326.544
receive : 1670079326.621
transmit : 1670079326.621
dest : 1670079326.699
offset : -0.000 sec
delay : +0.154 sec
packet count : 3
jitter : 0.000
poll interval: 128
adjust (slew): -0.000 sec
status : 8193 sync
time now : 1670079326.699
constant : 3
offset : -0.000 sec
freq offset : +119863 (+1 ppm)
interval/delta/delay/jitter/drift 128s/-0.000s/0.154s/0.000s/+1ppm
Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/timesync1 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=5 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
This supports the permissions theory, I believe.
Any hints on how to give the systemd-timesync user the necessary permission would be appreciated. I will continue to study. Most of the sources I find online caution users not to change permissions if they don’t know what they are doing, which would be me.
I tried running the openhabian-config Fix Permissions utility, but I still get the failed to run message:
2022-12-03_09:05:50_CST [openHABian] Applying file permissions recommendations... OK
2022-12-03_09:06:02_CST [openHABian] Checking for default openHABian username:password combination... FAILED
2022-12-03_09:06:03_CST [openHABian] We hope you got what you came for! See you again soon ;)
openhabian@openhab:~ $ sudo -u systemd-timesync SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-timesyncd
Failed to get link NTP servers: No data available
Bus bus-api-timesync: changing state UNSET → OPENING
Bus bus-api-timesync: changing state OPENING → AUTHENTICATING
Added new server 0.debian.pool.ntp.org.
Added new server 1.debian.pool.ntp.org.
Added new server 2.debian.pool.ntp.org.
Added new server 3.debian.pool.ntp.org.
systemd-timesyncd running as pid 10035
Selected server 0.debian.pool.ntp.org.
Resolving 0.debian.pool.ntp.org...
Bus bus-api-timesync: changing state AUTHENTICATING → HELLO
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0 signature=n/a error-name=n/a error-message=n/a
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=RequestName cookie=2 reply_cookie=0 signature=su error-name=n/a error-message=n/a
Got message type=method_return sender=org.freedesktop.DBus destination=:1.1810 path=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 signature=s error-name=n/a error-message=n/a
Bus bus-api-timesync: changing state HELLO → RUNNING
Got message type=signal sender=org.freedesktop.DBus.Local destination=n/a path=/org/freedesktop/DBus/Local interface=org.freedesktop.DBus.Local member=Connected cookie=4294967295 reply_cookie=0 signature=n/a error-name=n/a error-message=n/a
Got message type=signal sender=org.freedesktop.DBus destination=:1.1810 path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAcquired cookie=2 reply_cookie=0 signature=s error-name=n/a error-message=n/a
Got message type=method_return sender=org.freedesktop.DBus destination=:1.1810 path=n/a interface=n/a member=n/a cookie=3 reply_cookie=2 signature=u error-name=n/a error-message=n/a
Requested service name already owned, failing connection.
Bus bus-api-timesync: changing state RUNNING → CLOSING
Bus bus-api-timesync: changing state CLOSING → CLOSED
Resolved address 50.76.34.188:123 for 0.debian.pool.ntp.org.
Resolved address 162.159.200.1:123 for 0.debian.pool.ntp.org.
Resolved address 45.55.58.103:123 for 0.debian.pool.ntp.org.
Resolved address 38.229.59.9:123 for 0.debian.pool.ntp.org.
Selected address 50.76.34.188:123 of server 0.debian.pool.ntp.org.
Connecting to time server 50.76.34.188:123 (0.debian.pool.ntp.org).
Sent NTP request to 50.76.34.188:123 (0.debian.pool.ntp.org).
NTP response:
leap : 0
version : 4
mode : 4
stratum : 1
precision : 0.000000 sec (-25)
root distance: 0.000000 sec
reference : GPS
origin : 1670080031.442
receive : 1670080031.504
transmit : 1670080031.504
dest : 1670080031.714
offset : -0.074 sec
delay : +0.272 sec
packet count : 1
jitter : 0.000
poll interval: 32
adjust (slew): -0.074 sec
Failed to call clock_adjtime(): Operation not permitted
interval/delta/delay/jitter/drift 32s/-0.074s/0.272s/0.000s/+0ppm
Synchronized to time server for the first time 50.76.34.188:123 (0.debian.pool.ntp.org).
Sent NTP request to 50.76.34.188:123 (0.debian.pool.ntp.org).
NTP response:
leap : 0
version : 4
mode : 4
stratum : 1
precision : 0.000000 sec (-25)
root distance: 0.000000 sec
reference : GPS
origin : 1670080063.794
receive : 1670080063.830
transmit : 1670080063.830
dest : 1670080063.857
offset : +0.004 sec
delay : +0.063 sec
packet count : 2
jitter : 0.002
poll interval: 64
adjust (slew): +0.004 sec
Failed to call clock_adjtime(): Operation not permitted
interval/delta/delay/jitter/drift 64s/+0.004s/0.063s/0.002s/+0ppm