1

I have this weird issue which I can not track down to anything, I'm pretty unexperienced though so it could be likely I've been missing something obvious.

I'm struggling to understand why the ntpd service is continuously trying to reach the internet, despite having a correct time on the machines (both a Debian tower and Raspbian). I was under the impression that the daemon was meant to schedule time updates, not to go with a continuos stream of attempts.

Basically whenever I check active connections on my router I can always find 3+ connections to NTP servers from each of my Linux machines, sometimes totalling well over 15 established connections.

If I cut the connections from the router (clearing all connections) the wait until some new attempts are carried out is obviously very short, but waiting for the hypothetical update process to complete equals having a growing number of connections never 'doing their job'.

As you might have deduced (being there no RTC on the RPi), the simple fact of having Raspbian with currect clock means that at some point the update is completed and the time is set.

There's no need to explain how annoying this is starting to get, but as previously stated I unfortunately don't really have the knowledge (and probably means, i.e. software tools) to properly track down the cause, so:

  • which modus operandi would you reccomend to find some clues about the issue?
  • could this be instead caused by misconfiguration?
  • or, is this normal behaviour?

Thanks in advance for any valuable input.

  • 1
    Yes, this is normal behaviour. NTP is kindly seeking the correct time from NTP servers on the internet. – steve Nov 29 '16 at 19:54
  • Also macOS uses ntpd in such manner. I was using (on Linux) ntpdate few time a day (in crontab), but unfortunately it has discontinued/discouraged such use. – Giacomo Catenazzi Nov 30 '16 at 15:34
3

NTP is a time synchronisation protocol; by default, participants (including your systems running ntpd) exchange messages regularly to keep their clocks in sync. This means that it's perfectly normal to see multiple connections from your systems to various NTP servers; you can find out more about them by running ntpq and using the peers command:

ntpq> peers
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 0.debian.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
 1.debian.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
 2.debian.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
 3.debian.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
-ntp-3.arkena.ne 138.96.64.10     2 u  837 1024  377   45.882   -0.773   0.748
-ntp.univ-angers 145.238.203.14   2 u  684 1024  377   55.914    1.742   0.605
+regar42.fr      195.154.10.106   4 u  702 1024  377   47.394   -0.125   1.287
*dedibox.demonge 195.83.222.27    2 u  693 1024  377   45.821    0.628   2.468
-infidel.e-lista 145.238.203.14   2 u  699 1024  375   50.725    0.767   1.069
+195-154-10-106. 175.122.215.45   3 u  460 1024  377   46.420    0.052   2.269

(or simply ntpq -p from the shell).

If you want to run a one-off clock sync every once in a while, you might be better off using ntpdate instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.