Hi fellow Archers,

I seem to be having trouble with ntpd.service since the 4.2.7 upgrade. I
can't get ntpd to run as the ntp user.

I'm using the /etc/ntp.conf provided by the package ntp. When starting
ntpd.service (systemctl start ntp.service), ntpd spikes the CPU for a
moment, and then spikes the CPU about every 5 minutes afterward. What's
more is ntpq -p returns "No association ID's returned".

I ran "ntpd -g -u ntp:ntp -p /run/ntpd.pid -d" (from the Systemd unit
file). The results: <http://sprunge.us/QbYL>

The part I found of interest were the lines that read:

intres: EAI_SYSTEM errno 11 (Resource temporarily unavailable) means try
again, right?
select() returned -1: Interrupted system call
select() returned -1: Interrupted system call

I took out the "-u ntp:ntp" parameter (so ntp runs as root), and these
errors disappeared. Also, ntpq -p returns the NTP servers I'm
synchronized with. So, I'm pretty sure the issue is permissions related,
but I have no idea what it's running into. Any insight?

I currently modified /usr/lib/systemd/system/ntpd.service so that ntpd
runs as root instead of the user ntp. (Is there a cleaner way to tweak a
systemd unit file?) Everything seems to run fine for now.

On a side note, the Wiki says that timedatectl (part of systemd) can use
ntp for synchronization [1]. However, the man page for timedatectl shows
an example where chrony (another NTP server) is running. Does
ntpd.service need to be running for timedatectl to set time via NTP? Is
there a way to force timedatectl to query NTP (for testing)?

--Kyle

[1] https://wiki.archlinux.org/index.php/Ntp#systemd_services

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to