NTP service allways changes to inactive

You could try chmod +s on the binary for a try.
But I don’t think it is permissions. IIRC the RPi has no realtime clock maybe that is why.
Maybe you find an option that makes the demon run without trying to access the RTC?

Trying the permission approach first

openhabian@openhab:/lib/systemd $ ls -l systemd-timesyncd
-rwxr-xr-x 1 root root 46544 Aug  6  2021 systemd-timesyncd
openhabian@openhab:/lib/systemd $ chmod +s systemd-timesyncd
chmod: changing permissions of 'systemd-timesyncd': Operation not permitted
openhabian@openhab:/lib/systemd $ sudo chmod +s systemd-timesyncd
[sudo] password for openhabian: 
openhabian@openhab:/lib/systemd $ ls -l systemd-timesyncd
-rwsr-sr-x 1 root root 46544 Aug  6  2021 systemd-timesyncd
openhabian@openhab:/lib/systemd $ systemctl -a --failed
  UNIT                      LOAD   ACTIVE SUB    DESCRIPTION                                                     
● logrotate.service         loaded failed failed Rotate log files                                                
● nut-monitor.service       loaded failed failed Network UPS Tools - power device monitor and shutdown controller
● 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.

3 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.
openhabian@openhab:/lib/systemd $ systemctl start systemd-timesyncd.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'systemd-timesyncd.service'.
Authenticating as: ,,, (openhabian)
Password: 
==== AUTHENTICATION COMPLETE ===
openhabian@openhab:/lib/systemd $ 

Looking at the output from journalctl -u systemd-timesyncd, I can see that it works for a while (hours), and then fails

openhabian@openhab-midway:/var/lib/systemd/timesync $ journalctl -u systemd-timesyncd
-- Journal begins at Fri 2023-01-27 22:59:27 MST, ends at Sat 2023-01-28 07:02:50 MST. --
Jan 27 22:59:27 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Jan 27 22:59:27 openhab-midway.hsd1.ut.comcast.net systemd-timesyncd[18706]: Initial synchronization to time server 38.229.53.9:123 (0.debian.pool.ntp.org).
Jan 27 22:59:29 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Jan 27 22:59:29 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 27 22:59:29 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Jan 27 22:59:29 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Jan 27 22:59:30 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Jan 27 22:59:30 openhab-midway.hsd1.ut.comcast.net systemd-timesyncd[18730]: Initial synchronization to time server 38.229.57.9:123 (0.debian.pool.ntp.org).
Jan 27 22:59:32 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Jan 27 22:59:32 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 27 22:59:32 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Jan 27 22:59:32 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Jan 27 22:59:33 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Jan 27 22:59:33 openhab-midway.hsd1.ut.comcast.net systemd-timesyncd[18776]: Initial synchronization to time server 45.55.58.103:123 (0.debian.pool.ntp.org).
Jan 27 22:59:35 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Jan 27 22:59:35 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 27 22:59:35 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Jan 27 22:59:35 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Jan 27 22:59:36 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Jan 27 22:59:36 openhab-midway.hsd1.ut.comcast.net systemd-timesyncd[18801]: Initial synchronization to time server 152.44.36.235:123 (0.debian.pool.ntp.org).
Jan 27 22:59:38 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Jan 27 22:59:38 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 27 22:59:38 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Jan 27 22:59:38 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Jan 27 22:59:39 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Jan 27 22:59:39 openhab-midway.hsd1.ut.comcast.net systemd-timesyncd[18837]: Initial synchronization to time server 104.131.155.175:123 (0.debian.pool.ntp.org).
Jan 27 22:59:41 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Jan 27 22:59:41 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 27 22:59:41 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Jan 27 22:59:41 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Jan 27 22:59:42 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Jan 27 22:59:42 openhab-midway.hsd1.ut.comcast.net systemd-timesyncd[18875]: Initial synchronization to time server 45.63.54.13:123 (0.debian.pool.ntp.org).
Jan 27 22:59:44 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Jan 27 22:59:44 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 27 22:59:44 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Jan 27 22:59:44 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Jan 27 22:59:45 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Jan 27 22:59:45 openhab-midway.hsd1.ut.comcast.net systemd-timesyncd[18903]: Initial synchronization to time server 104.131.155.175:123 (0.debian.pool.ntp.org).
Jan 27 22:59:47 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Jan 27 22:59:47 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 27 22:59:47 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Jan 27 22:59:47 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Jan 27 22:59:48 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Jan 27 22:59:48 openhab-midway.hsd1.ut.comcast.net systemd-timesyncd[18956]: Initial synchronization to time server 64.142.54.12:123 (0.debian.pool.ntp.org).
Jan 27 22:59:50 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Jan 27 22:59:50 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 28 01:21:19 openhab-midway.hsd1.ut.comcast.net systemd-timesyncd[31717]: Initial synchronization to time server 23.131.160.7:123 (0.debian.pool.ntp.org).
Jan 28 01:21:22 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Jan 28 01:21:22 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 28 01:21:22 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Jan 28 01:21:22 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Jan 28 01:21:22 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Jan 28 01:21:22 openhab-midway.hsd1.ut.comcast.net systemd-timesyncd[31736]: Initial synchronization to time server 66.85.78.80:123 (0.debian.pool.ntp.org).
Jan 28 01:21:25 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Jan 28 01:21:25 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 28 01:21:25 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Jan 28 01:21:25 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Jan 28 01:21:25 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Jan 28 01:21:28 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Jan 28 01:21:28 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 28 01:21:28 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Jan 28 01:21:28 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Jan 28 01:21:28 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Jan 28 01:21:31 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Jan 28 01:21:38 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 28 01:21:38 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Jan 28 01:21:38 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Jan 28 01:21:39 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Jan 28 01:21:39 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Jan 28 01:21:39 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 28 01:21:39 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Jan 28 01:21:39 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Jan 28 01:21:39 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Jan 28 01:21:39 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Jan 28 01:21:39 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 28 01:21:39 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Jan 28 01:21:39 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Jan 28 01:21:40 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Jan 28 01:21:40 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Jan 28 01:21:40 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 28 01:21:40 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Jan 28 01:21:40 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Jan 28 01:21:40 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Jan 28 01:21:41 openhab-midway.hsd1.ut.comcast.net systemd-timesyncd[31966]: Initial synchronization to time server 50.116.55.218:123 (0.debian.pool.ntp.org).
Jan 28 01:21:43 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Jan 28 01:21:43 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 28 01:21:43 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Jan 28 01:21:43 openhab-midway.hsd1.ut.comcast.net systemd[1]: Starting Network Time Synchronization...
Jan 28 01:21:43 openhab-midway.hsd1.ut.comcast.net systemd[1]: Started Network Time Synchronization.
Jan 28 01:21:43 openhab-midway.hsd1.ut.comcast.net systemd-timesyncd[32022]: Initial synchronization to time server 38.229.59.9:123 (0.debian.pool.ntp.org).
Jan 28 01:21:46 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopping Network Time Synchronization...
Jan 28 01:21:46 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 28 01:21:46 openhab-midway.hsd1.ut.comcast.net systemd[1]: Stopped Network Time Synchronization.
Jan 28 01:21:46 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Start request repeated too quickly.
Jan 28 01:21:46 openhab-midway.hsd1.ut.comcast.net systemd[1]: systemd-timesyncd.service: Failed with result 'start-limit-hit'.
Jan 28 01:21:46 openhab-midway.hsd1.ut.comcast.net systemd[1]: Failed to start Network Time Synchronization.

And as one might expect, the timestamp on the clock file was last update when it failed:

openhabian@openhab-midway:/var/lib/systemd/timesync $ ls -l
total 0
-rw-r--r-- 1 systemd-timesync systemd-timesync 0 Jan 28 01:21 clock

This looks odd to me. I’m no expert on it, but I’m surprised it is starting and stopping so often right from the beginning. Yes it appears to work for quite some time before failing, but I would have expected to see this start once only. I have no idea why this might be happening, but maybe it is worth some investigation?

Thanks for the input. I think you were spot on when you said “appears to be working.” It isn’t really working, just the clock file timestamp gets updated because it tried to run.

Repeating for my benefit a debug command suggest by someone else earlier in this thread

, I can see that it is not really working and is failing trying to call clock_adjtime:
openhabian@openhab-midway:~ $ sudo -u systemd-timesync 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
sd-bus: starting bus bus-api-timesync by connecting to /run/dbus/system_bus_socket…
Bus bus-api-timesync: changing state OPENING → AUTHENTICATING
Registering bus object implementation for path=/org/freedesktop/LogControl1 iface=org.freedesktop.LogControl1
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 11863
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.52151 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.52151 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.52151 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.52151 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 96.248.124.200:123 for 0.debian.pool.ntp.org.
Resolved address 171.66.97.126:123 for 0.debian.pool.ntp.org.
Resolved address 162.220.14.14:123 for 0.debian.pool.ntp.org.
Resolved address 207.244.103.95:123 for 0.debian.pool.ntp.org.
Selected address 96.248.124.200:123 of server 0.debian.pool.ntp.org.
Connecting to time server 96.248.124.200:123 (0.debian.pool.ntp.org).
Sent NTP request to 96.248.124.200:123 (0.debian.pool.ntp.org).
NTP response:
leap : 0
version : 4
mode : 4
stratum : 1
precision : 0.000002 sec (-19)
root distance: 0.050064 sec
reference : PPS
origin : 1675002488.394
receive : 1675002486.749
transmit : 1675002486.750
dest : 1675002488.476
offset : -1.685 sec
delay : +0.080 sec
packet count : 1
jitter : 0.000
poll interval: 32
adjust (jump): -1.685 sec
Failed to call clock_adjtime(): Operation not permitted
interval/delta/delay/jitter/drift 32s/-1.685s/0.080s/0.000s/+0ppm
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
Initial synchronization to time server 96.248.124.200:123 (0.debian.pool.ntp.org).
Sent NTP request to 96.248.124.200:123 (0.debian.pool.ntp.org).
NTP response:
leap : 0
version : 4
mode : 4
stratum : 1
precision : 0.000002 sec (-19)
root distance: 0.050064 sec
reference : PPS
origin : 1675002520.552
receive : 1675002518.908
transmit : 1675002518.908
dest : 1675002520.634
offset : -1.685 sec
delay : +0.081 sec
packet count : 2
jitter : 0.637
poll interval: 32
adjust (jump): -1.685 sec
Failed to call clock_adjtime(): Operation not permitted
interval/delta/delay/jitter/drift 32s/-1.685s/0.081s/0.637s/+0ppm
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 96.248.124.200:123 (0.debian.pool.ntp.org).
NTP response:
leap : 0
version : 4
mode : 4
stratum : 1
precision : 0.000002 sec (-19)
root distance: 0.050064 sec
reference : PPS
origin : 1675002552.802
receive : 1675002551.160
transmit : 1675002551.160
dest : 1675002552.887
offset : -1.684 sec
delay : +0.084 sec
packet count : 3
jitter : 1.560
poll interval: 32
adjust (jump): -1.684 sec
Failed to call clock_adjtime(): Operation not permitted
interval/delta/delay/jitter/drift 32s/-1.684s/0.084s/1.560s/+0ppm
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
Sent NTP request to 96.248.124.200:123 (0.debian.pool.ntp.org).
NTP response:
leap : 0
version : 4
mode : 4
stratum : 1
precision : 0.000002 sec (-19)
root distance: 0.050064 sec
reference : PPS
origin : 1675002585.052
receive : 1675002583.407
transmit : 1675002583.408
dest : 1675002585.135
offset : -1.686 sec
delay : +0.082 sec
packet count : 4
jitter : 1.424
poll interval: 32
adjust (jump): -1.686 sec
Failed to call clock_adjtime(): Operation not permitted
interval/delta/delay/jitter/drift 32s/-1.686s/0.082s/1.424s/+0ppm
Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/timesync1 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=6 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Sent NTP request to 96.248.124.200:123 (0.debian.pool.ntp.org).
NTP response:
leap : 0
version : 4
mode : 4
stratum : 1
precision : 0.000002 sec (-19)
root distance: 0.050079 sec
reference : PPS
origin : 1675002617.302
receive : 1675002615.657
transmit : 1675002615.657
dest : 1675002617.384
offset : -1.687 sec
delay : +0.082 sec
packet count : 5
jitter : 1.274
poll interval: 32
adjust (jump): -1.687 sec
Failed to call clock_adjtime(): Operation not permitted
interval/delta/delay/jitter/drift 32s/-1.687s/0.082s/1.274s/+0ppm
Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/timesync1 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=7 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Sent NTP request to 96.248.124.200:123 (0.debian.pool.ntp.org).
NTP response:
leap : 0
version : 4
mode : 4
stratum : 1
precision : 0.000002 sec (-19)
root distance: 0.050079 sec
reference : PPS
origin : 1675002649.552
receive : 1675002647.902
transmit : 1675002647.903
dest : 1675002649.630
offset : -1.689 sec
delay : +0.078 sec
packet count : 6
jitter : 1.106
poll interval: 32
adjust (jump): -1.689 sec
Failed to call clock_adjtime(): Operation not permitted

that’s what you need to figure out. Something is very likely incorrect with respect to permissions - which you already know. I can see that up above you tried using the fix permissions from openhabian but possibly this is an area that it doesn’t or can’t fix for some reason. Did this ever work? If it once worked, what changed? Can you compare with a similar working system? Ideally you would find all files on the working system that are owned by user or group systemd-timesync and compare to the non-working system. Sorry, not much help.

I have had a similiar (or maybe the same?) problem where dbus timesync (alias of systemd-timesyncd) was competing against another systemd-timesyncd client.
Try disabling the dbus timesync. To me that was difficult as both time clients appear in journalctl with the same name (systemd-timesyncd).

I simply ran

sudo systemctl stop (or kill) systemd-timesyncd --now
sudo systemctl disable systemd-timesyncd --now

a FEW times and deleted these dbus files:

/etc/systemd/system/dbus-org.freedesktop.timesync1.service
/lib/dhcpcd/dhcpcd-hooks/50-timesyncd.conf
/lib/systemd/system/ (and dbus subdirectory)

after a restart I did not had any weird systemlog entries anymore

@Oliver2 thanks for sharing your experience with this (or a closely related issue).

So it sounds like that is happening is that systemd-timesynd.service is being called for twice. The first instance does it job while the second one tries to start and fails as seen in the logs above. Eventually the system decides it has started too many times and kills it.

Deleting system files is a little scary to a linux novice like me, so I want to be sure I’m deleting the right directories. When you say

I’m not sure what you mean. If I am deleting /lib/systemd/system/, it would seem unnecessary to have a step deleting /etc/systemd/system/dbus-org.freedesktop.timesync1.service, as it is under /lib/systemd/system/.

I do see a file dbus-org.freedesktop.timedate1.service in /lib/systemd/service

openhabian@openhab-midway:/lib/systemd/system $ cat dbus-org.freedesktop.timedate1.service
#  SPDX-License-Identifier: LGPL-2.1-or-later
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Time & Date Service
Documentation=man:systemd-timedated.service(8)
Documentation=man:localtime(5)
Documentation=man:org.freedesktop.timedate1(5)

[Service]
BusName=org.freedesktop.timedate1
CapabilityBoundingSet=CAP_SYS_TIME
DeviceAllow=char-rtc r
ExecStart=/lib/systemd/systemd-timedated
IPAddressDeny=any
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
PrivateTmp=yes
ProtectProc=invisible
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectSystem=strict
ReadWritePaths=/etc
RestrictAddressFamilies=AF_UNIX
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
SystemCallArchitectures=native
SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service @clock
WatchdogSec=3min
openhabian@openhab-midway:/lib/systemd/system $ 

which looks a lot like /lib/systemd/system/systemd-timesyncd.service

openhabian@openhab-midway:/lib/systemd/system $ cat systemd-timesyncd.service
#  SPDX-License-Identifier: LGPL-2.1-or-later
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Network Time Synchronization
Documentation=man:systemd-timesyncd.service(8)
ConditionCapability=CAP_SYS_TIME
ConditionVirtualization=!container
DefaultDependencies=no
After=systemd-sysusers.service
Before=time-set.target sysinit.target shutdown.target
Conflicts=shutdown.target
Wants=time-set.target time-sync.target

[Service]
AmbientCapabilities=CAP_SYS_TIME
BusName=org.freedesktop.timesync1
CapabilityBoundingSet=CAP_SYS_TIME
ExecStart=!!/lib/systemd/systemd-timesyncd
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
PrivateDevices=yes
PrivateTmp=yes
ProtectProc=invisible
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectSystem=strict
Restart=always
RestartSec=0
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
RuntimeDirectory=systemd/timesync
StateDirectory=systemd/timesync
SystemCallArchitectures=native
SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service @clock
Type=notify
User=systemd-timesync
WatchdogSec=3min

[Install]
WantedBy=sysinit.target
Alias=dbus-org.freedesktop.timesync1.service
openhabian@openhab-midway:/lib/systemd/system $ 

Perhaps these are the two that are conflicting but since one uses as an alias the name of the other, I can’t see it.

I am not too experienced either😂
There are probably other and better ways to deactivate services and make sure they are never being loaded again.
For me it was easier to simply delete these files.

Yes, because dbus-org.freedesktop.timedate1.service is an alias to systemd-timesyncd.

I meant deleting any files or directories related to dbus.

If you do not want to delete them you can move them into your home directory

Please double-validate that first!
Is there really another instance running?
Use systemctl list-units to display all services and systemctl list-units --state failed to see those that failed.
Watch for more processes with sync in their name (note that if you don’t spot any they can be stopped at times and started in intervals so keep repeating checking).
I just checked a fresh openHABian install, there is no dbus timesync or other second time daemon there but systemd-timesyncd is also reported to have stopped as failed. I was able to start it again and it has been running since but it’s not long enough to tell if that’s permanent.

NEVER DELETE ANY DIRECTORIES. You can delete (better: rename) FILES in either /etc/systemd/system/ or /lib/systemd/system and issue systemctl daemon-daemon to uninstall a (stopped and disabled !) service but the proper way is to use systemctl mask.
systemctl will create/remove the right links for you.
You must not intervene manually or you have a high risk of trashing your system !
You can disable services with systemctl disable --now service and avoid permanently that it could indirectly or accidently be re-enabled by using systemctl mask service.
To check it worked try systemctl enable service after masking, it should refuse to.

1 Like

Yes, of course. I was sharing a rebuttal hypothesis as I try to work through this problem. I appreciate your advice. I only see one instance running:

openhabian@openhab-midway:~ $ systemctl list-units | grep sync
  ifupdown-pre.service                                                                                                                                          loaded active exited    Helper to synchronize boot up for ifupdown
  systemd-timesyncd.service                                                                                                                                     loaded active running   Network Time Synchronization
  time-sync.target                                                                                                                                              loaded active active    System Time Synchronized
  sdrsync.timer                                                                                                                                                 loaded active waiting   Run SD rsync daily except semiannually (when a raw dump is made)

I look forward to hearing how your experiment works out!

Thanks. I will give this a try.

I don’t have any news but the problem might be that there has been some change inside Raspi OS in the past and it’s now firing up another instance of timesyncd or a competing demon or whatever.

As you’re apparently really willing to help with development, you can create your own openHABian image to experiment with adding or removing parts of its configuration, here’s how.
It’s really simple, just a little time consuming (net time then again isn’t much, just compilation times).

Just clone the sources from Github, edit your local copy then push it back to Github. It will respond with that you don’t have write access etc pp and tell you a link to create a PR (pull request), enter that one.
When you upload, it’ll build an image that you can download and flash to your local (test) box.

There’s a function setup_ntp() in functions/system.bash I’d start with.
Try to omit installation of timesyncd for a first attempt. Insert some status outputting code (/bin/date or ps -ef|grep -i ntp or whatever) instead to see NTP/date status of the box.
Maybe that’s providing us some more insight.
Good luck.

Thanks for the ideas. I will give it a try and report back. It will be awhile, as we are going to be traveling most of the next month, and the spare Pi that I have is currently on loan to a friend, so I will need to get it back and give it a try.

Hi all,

I am experiencing also NTP binding issues together with some other as you can read here

I read this thread thouroughly. Acutally my system time was still up2date even though the NTP was not. So maybe that is a little different issue.

Thanks for sharing your experience. The more people who report a problem, the more interest there will be in fixing it. Or perhaps better said, the better the chance that someone with the needed background and skills will take it on.

As the OP on this thread, I hoping to explore the ideas that were suggested above. I should be getting my spare Pi back the end of the month. The suggestions are way beyond me, but I’m happy to learn.

1 Like

I finally got my test machine back and I’m ready to give this a try.
I cloned from GitHub, downloaded with Github Desktop, edited with VSCode (commented out the NTP section, added one of the lines you suggested), Pushed it back to GitHub.
I have my fork GitHub - BigGeorgeTx/openhabian: openHABian - empowering the smart home, for Raspberry Pi and Debian systems

I’m not sure how to proceed. You said

I don’t see where I get the file to flash to an SD card from GitHub. Can you please tell me how to do this?

Hmm, your clone repo seems to be missing actions. I though they would be cloned, too.
They’re at openhabian/.github/workflows at main · openhab/openhabian · GitHub .
Add build.yml to your repo and see if you get a build action.

When I look in my clone repo, the actions are there: openhabian/.github/workflows at main · BigGeorgeTx/openhabian · GitHub

But your comment about Actions gave me an idea of where to look. I clicked on Actions and got this message: “Workflows aren’t being run on this forked repository
Because this repository contained workflow files when it was forked, we have disabled them from running on this fork. Make sure you understand the configured workflows and their expected usage before enabling Actions on this repository.” Once I accepted this, I clicked Actions again and under Workflows ran the build action, which queued and than ran, with errors: Build · BigGeorgeTx/openhabian@9c28990 · GitHub

Do I need to sync the fork before building?
Not having heard anything, I decided to try it. It took several days for the fork sync to complete running, but once it did, when I ran the workflow for the build action, it completed successfully, with 45 minutes elapsed time.
Now I need to download and flash to my text box.
On the GitHub code page for my fork, I clicked on CODE then Download ZIP.
Created the image on the SD card using Raspberry Pi’s imager.
Put in Pi and booted. The ethernet connection shows lots of activity, but I can’t connect to it via SSH.
Turns out the SD card was bad. Will try again with a new card and report back

I thinking I missing something to create the SD card image from the GitHub code. I tried downloading is as a zip file, but when I write that to the SD card using Rasperry Pi Imager, it doesn’t create a bootable SD card. I’m not sure how to the create the .img file it appears to be looing for. Help, please.

George
try the Rasberry imager