0

I'm running latest Raspbian Lite on Raspberry Pi 3 B. Just reinstalled ntpd completely and it doesn't synchronize time with upstream NTP servers at all.

ntpdate -u 0.debian.pool.ntp.org

works just fine. Using tcpdump (for eth0 interface) I can see that with ntpdate there are NTP packets going both ways, but with ntpd there is no response from the upstream servers (0...3.debian.pool.ntp.org servers set in ntpd config). When ntpd is running, using ntpq -p I can see:

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 0.debian.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.001
 1.debian.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.001
 2.debian.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.001
 3.debian.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.001

What may be the source of this problem?

sq8l
  • 1
  • Indeed, reach = 0 shows that the NTP servers are not reached. Any logs? A day ago someone's chrony server (a better choice than ntpd, by the way) kept exiting because the systemd-timesyncd was already running. Perhaps this is your situation, and ntpd reacts differently. – berndbausch Mar 04 '21 at 11:18
  • Here are the logs from ntpd: https://pastebin.pl/view/c4a8a3c2 Systemd-timesyncd detects ntpd and is not running – sq8l Mar 04 '21 at 12:56
  • Anyway, installed Chrony and it seems to be working properly... – sq8l Mar 04 '21 at 13:15
  • I started searching for "soliciting pool servers". Plenty of hits. Glad that chrony fixed it. – berndbausch Mar 04 '21 at 13:20
  • Installing chrony seems to be the right solution. ntp is being abandoned because bugs aren't being fixed. – Andrew Schulman Mar 05 '21 at 02:22

1 Answers1

0

It's very likely that your /etc/ntp.conf is missing the following section:

# Needed for adding pool entries
restrict source notrap nomodify noquery

This is part of the default configuration on Debian & Ubuntu, but if you were using a template based on an old version of ntpd, it was likely missing. This is a good example of why it's helpful to keep your configuration as close to the default as possible.

Paul Gear
  • 3,938
  • 15
  • 36