Time is not getting synchronized in Chrony setup

I have set up a local network chrony configuration between two nodes, where I want both nodes to always have same time. I found that 2nd node is not automatically sync'ing the time from first node, it does that only when makestep is done manually.
2nd question I have is what is the time interval in which 2nd node will check 1st node if there is a change in time ?
On node1 I have below settings in /etc/chrony.conf
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
logdir /var/log/chrony
log measurements statistics tracking
server 127.0.0.1
allow 192.168.10.7 <----------- specific IP of the second node

local stratum 10

On 2nd node, settings are these -
driftfile /var/lib/chrony/drift
makestep 1 1
rtcsync
logdir /var/log/chrony
log measurements statistics tracking

server 192.168.10.7 iburst

As soon as I start chrony on 2nd node or do a manual makestep, I see that 2nd node gets the time same as first node.. But if I have chrony running on 2nd node and change 1st nodes time. 2nd node detects that there is a time difference in below output of chronic tracking, but still doesn't sync the time... I want to understand why it doesn't sync.
$node2: chronyc tracking
Reference ID : 93B22808 (FILE-1)
Stratum : 11
Ref time (UTC) : Fri Jan 29 06:08:15 2021
System time : 9182.181640625 seconds slow of NTP time
Last offset : +0.000131132 seconds
RMS offset : 305.027038574 seconds
Frequency : 1.395 ppm slow
Residual freq : +0.004 ppm
Skew : 0.061 ppm
Root delay : 0.000979753 seconds
Root dispersion : 0.000705841 seconds
Update interval : 962.1 seconds
Leap status : Normal

Comments

  • AndreasAndreas Senior Member
    edited January 29

    Synchronise your ntp server (chrony) with an atomic clock or stop running this ntp server! Do not use any local clock (=> server 127.0.0.1)!!

    => use for standalone mode a GNSS receiver (GPS, Galileo, GLONASS) or a receiver for any longwave time signal (DCF77, WWVB, MSF, JJY40, JJY60 => ask Wikipedia for more informationen...)
    https://hopf.com/dcf77-gps_en.php
    Every modern time synchronisation system works as a GPSDO:
    https://en.wikipedia.org/wiki/GPS_disciplined_oscillator
    System time : 9182.181640625 seconds slow of NTP time => too big time difference for a clock synchronisation!
    Please read:
    man hwclock => chapter "Automatic Hardware Clock Synchronization by the Kernel"
    and check:

    /usr/bin/timedatectl

    Local time: Fre 2021-01-29 21:24:46 CET
    Universal time: Fre 2021-01-29 20:24:46 UTC
    RTC time: Fre 2021-01-29 20:24:46
    Time zone: Europe/Zurich (CET, +0100)
    Network time on: no
    NTP synchronized: yes
    RTC in local TZ: no

    /usr/bin/chronyc tracking

    Reference ID : C0A80D37 (192.168.13.55)
    Stratum : 3
    Ref time (UTC) : Fri Jan 29 20:27:25 2021
    System time : 0.000002808 seconds slow of NTP time
    Last offset : -0.000003918 seconds
    RMS offset : 0.006486172 seconds
    Frequency : 10.573 ppm fast
    Residual freq : -0.001 ppm
    Skew : 0.106 ppm
    Root delay : 0.015559196 seconds
    Root dispersion : 0.001926733 seconds
    Update interval : 64.5 seconds
    Leap status : Normal

    /usr/bin/chronyc sources -v
    210 Number of sources = 1

    .-- Source mode '^' = server, '=' = peer, '#' = local clock.
    / .- Source state '*' = current synced, '+' = combined , '-' = not combined,
    | / '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
    || .- xxxx [ yyyy ] +/- zzzz
    || Reachability register (octal) -. | xxxx = adjusted offset,
    || Log2(Polling interval) --. | | yyyy = measured offset,
    || \ | | zzzz = estimated error.
    || | | \

    MS Name/IP address Stratum Poll Reach LastRx Last sample

    ^* 192.168.13.55 2 6 377 15 -156us[ -217us] +/- 9060us

    Check "Automatic Hardware Clock Synchronization by the Kernel" with a small shell script:
    #!/bin/bash
    /usr/sbin/adjtimex --print | awk '/status/ {
    if ( and($2, 64) == 0 ) {
    print "synchronisation activ (11 minutes mode on)"
    }
    else {
    print "synchronisation inactiv (11 minutes mode off)"
    }
    }'

Sign In or Register to comment.