[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ntp questions



Hi,

On Sat, Mar 14, 2020 at 09:49:43PM -0400, Gene Heskett wrote:
> In an attempt to reduce the load on my time servers

Is this an actual problem you have observed? I ask because there is
very little that an individual can do to cause noticeable load on a
time server. You would have to have many misconfigured machines
requesting time every fraction of a second for anyone to notice
above background noise.

> A gene@shop:~$ sudo /etc/init.d/ntp status
> [ ok ] NTP server is running.
> 
> Which is typical when its all synched

This isn't actually giving you any more information than the command
you typed on your pi machine. All it's saying is that ntpd is
running, which is the same as what is being reported on the pi.

> but the pi is reporting:
> pi@rpi4:/var/log/ntpstats $ sudo /etc//init.d/ntp status
> ● ntp.service - Network Time Service
>    Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor 
> preset: enabled)
>    Active: active (running) since Sat 2020-03-14 20:17:25 EDT; 57min ago
>      Docs: man:ntpd(8)
>   Process: 16957 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, 
> status=0/SUCCESS)
>  Main PID: 16963 (ntpd)

ntpd loaded and running then…

> Mar 14 20:17:25 rpi4.coyote.den ntpd[16963]: kernel reports TIME_ERROR: 
> 0x2041: Clock Unsynchronized
> Mar 14 20:17:25 rpi4.coyote.den ntpd[16963]: kernel reports TIME_ERROR: 
> 0x2041: Clock Unsynchronized
> 
> What is wrong with my /etc/ntp.conf on the pi that is causing this 
> apparent failure?

I assume you are referring to the "kernel reports TIME_ERROR" lines
when you say "apparent failure". If so, this is only saying that the
situation at the time the ntpd process started was that your clock
was unsynchronized. It is not unexpected to see this.

What you would generally expect is for it to become synchronized in
a fairly short period of time (minutes).

While you have ntpd running on your pi, what is the output of:

$ ntptime

and

$ ntpq -np

?

There may not be anything wrong with the time service on your pi. Or
there might be, but it hasn't been demonstrated yet; the output of
the above commands will tell us more.

You might also like to compare those outputs to the outputs they
provide on a machine you think is working.

Additionally, this is not the cause of any problem, but I note you
have only one "server" directive in your ntp.conf. Hopefully
192.168.71.3 itself has more than one "server" directive, because
your other machines are trusting 192.168.71.3 to tell them the time
(here I am assuming that "coyote.coyote.den" is also 192.168.71.3).

An odd number of servers, at least 3, are preferred so that if one
of them goes bad, the NTP algorithms can detect that and ignore the
source. With only one server there's no way to tell. With two, it
can tell but not tell which one is correct. With three or more it
can work it out.

I don't think we've seen the ntp.conf for 192.168.71.3 so maybe it
does have at least three "server" directives in there. If it
doesn't, you should take care of that.

If you have an always-on Internet connection I would also consider
adding more "server" directives even to the clients. The local one
(192.168.71.3) should still see most usage as long as it is a good
timekeeper.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting


Reply to: