1

Is there any issue with running systemd-timesyncd and ntp on the same machine?

I'm asking this because I have started using NTP on all servers but the systemd-timesyncd is running there as well. Should I disable it? Any issues with both running?

user630702
  • 189
  • 1
  • 8

1 Answers1

2

It shouldn't be necessary to disable systemd-timesyncd if you install ntp, because the ntp service configuration includes the following:

# grep -i conflict /lib/systemd/system/ntp.service 
Conflicts=systemd-timesyncd.service

The same applies for the chrony service on newer Ubuntu versions.

There have been startup bugs in the past which meant systemd-timesyncd tried to adjust the clock while another NTP server is running, producing harmless-but-annoying errors in the system logs. So there should be no harm in disabling systemd-timesyncd if that's what you prefer.

Paul Gear
  • 434
  • 2
  • 12
  • In my case, though, I often see `ntp` not started on a reboot. (from what I know, that happens when port 123 is already in use). So there must be some sort of side effect... – Alexis Wilke Feb 18 '21 at 01:17
  • When that happens, grab your `systemctl status ntp.service` output straight after boot to confirm. But again, there have been startup bugs in the past which should be long-fixed by now if your packages are up-to-date. I haven't seen NTP fail to start on boot for a long time. – Paul Gear Feb 18 '21 at 02:07