[ntp:questions] NTP not syncing

antonio.marcheselli at gmail.com antonio.marcheselli at gmail.com
Sat Nov 2 15:33:39 UTC 2013


Hello all,

I have a Linux machine which comes with fixed configuration. The manufacturer allows only ONE NTP server to be setup and I learnt that this is not ideal. In fact, the NTP service usually does not work and I have to reboot the machine every now and then, so the NTPDATE command built in the boot script can re-sync the clock.

I have tinkered with the configuration file manually and ended up with a working server. But when I stored the same configuration on the read only partition and rebooted, looks like it does not work anymore and after 2 days the offset keeps increasing.

I put the same configuration on three different servers on the same network, looks like sometimes it works, sometime it doesn't.

Here is my configuration from ntp.con

===
    server 127.127.1.0
    fudge 127.127.1.0 stratum 10
    server 158.43.128.66
    server 81.168.77.149
    server 130.88.200.4
    restrict 127.0.0.1
    restrict 130.1.1.1 mask 255.255.255.0 nomodify
    tos orphan 4
    driftfile /status/etc/ntp/ntp.drift
    logfile /var/log/ntp.log
    multicastclient
    broadcastdelay 0.008
    enable monitor
===

Some of the parameters were on the factory configurations, so I left them. Like the broadcastdelay.
130.1.1.1 is a secure device which pools the time from the server.

Below some data from ntpq

===
ntpq> o
     remote           local      st t when poll reach   delay   offset    disp
==============================================================================
 LOCAL(0)        127.0.0.1       10 l   47   64  377    0.000    0.000   0.924
+158.43.128.66   192.168.241.5    2 u   41   64  377   61.669  -7159.7   4.450
+81.168.77.149   192.168.241.5    3 u   13   64  377   90.475  -7167.2   2.633
*130.88.200.4    192.168.241.5    2 u   60   64  377   66.076  -7145.6   4.446

ntpq> as

ind assID status  conf reach auth condition  last_event cnt
===========================================================
  1 37689  9014   yes   yes  none    reject   reachable  1
  2 37690  9634   yes   yes  none  sys.peer   reachable  3
  3 37691  9434   yes   yes  none  candidat   reachable  3
  4 37692  9434   yes   yes  none  candidat   reachable  3

ntpq> rv 37690
assID=37690 status=9634 reach, conf, sel_sys.peer, 3 events, event_reach,
srcadr=158.43.128.66, srcport=123, dstadr=192.168.241.5, dstport=123,
leap=00, stratum=2, precision=-18, rootdelay=7.828,
rootdispersion=13.504, refid=193.67.79.202, reach=377, unreach=0,
hmode=3, pmode=4, hpoll=6, ppoll=6, flash=00 ok, keyid=0, ttl=0,
offset=-7173.285, delay=61.536, dispersion=5.112, jitter=9.722,
reftime=d61f9793.3468c000  Sat, Nov  2 2013 15:24:03.204,
org=d61f98ad.c8944000  Sat, Nov  2 2013 15:28:45.783,
rec=d61f98b5.00efc90d  Sat, Nov  2 2013 15:28:53.003,
xmt=d61f98b4.f0dce3a7  Sat, Nov  2 2013 15:28:52.940,
filtdelay=    62.73   62.49   62.18   62.57   62.21   62.15   63.05   61.54,
filtoffset= -7188.7 -7186.2 -7183.9 -7181.9 -7179.7 -7177.5 -7175.1 -7173.2,
filtdisp=      0.01    0.95    1.91    2.87    3.82    4.76    5.74    6.70
ntpq>
===

An extract from the logs:
 
 2 Nov 15:02:02 ntpd[5306]: frequency error -527 PPM exceeds tolerance 500 PPM
 2 Nov 15:05:20 ntpd[5306]: frequency error -527 PPM exceeds tolerance 500 PPM
 2 Nov 15:09:04 ntpd[5306]: synchronized to 158.43.128.66, stratum 2
 2 Nov 15:09:04 ntpd[5306]: frequency error -527 PPM exceeds tolerance 500 PPM
 2 Nov 15:17:07 ntpd[5306]: frequency error -527 PPM exceeds tolerance 500 PPM
 2 Nov 15:19:14 ntpd[5306]: synchronized to 130.88.200.4, stratum 2
 2 Nov 15:21:28 ntpd[5306]: frequency error -527 PPM exceeds tolerance 500 PPM
 2 Nov 15:27:47 ntpd[5306]: synchronized to 158.43.128.66, stratum 2
 2 Nov 15:27:47 ntpd[5306]: frequency error -527 PPM exceeds tolerance 500 PPM
 2 Nov 15:29:58 ntpd[5306]: frequency error -527 PPM exceeds tolerance 500 PPM


This server synced perfectly for the last 2 weeks with the same exact configuration. 

Could someone please help? I can add a forth server if needed, I also understand that it would be recommended to use the iburst parameter.

Thanks for your help!

Antonio



More information about the questions mailing list