Chronyd is not synchronizing with NTP server

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux (RHEL)
    • 7
    • 8
    • 9
  • Chronyd

Issue

  • Message "Can't synchronise: no selectable sources" is shown in chronyd service.

  • Why is time not in sync with NTP server? The output is reporting reach value is 0:

        # chronyc -n sources -v
    
        MS Name/IP address         Stratum Poll Reach LastRx Last sample
        ===============================================================================
        ^? x.x.x.x                       0  10     0     -     +0ns[   +0ns] +/-    0ns
        ^? x.x.x.x                       0  10     0     -     +0ns[   +0ns] +/-    0ns
        ^? x.x.x.x                       0  10     0     -     +0ns[   +0ns] +/-    0ns
    
  • Reach value of 0 indicates that the ntp client is unable to connect to the ntp servers at port 123.

Resolution

Issue found with network connectivity or firewall rules between chronyd client and NTP servers. Refer to the "Diagnostic Steps" section for additional troubleshooting information.

Root Cause

There could be different reasons preventing chrony to synchronize, like:

  • A subnet masking issue was found in one of the assigned IP address.
  • Firewall rules were blocking port 123/udp,
  • Unable to connect to port 123 on NTP servers.

Diagnostic Steps

  1. Collect chronyd source status:

    # chronyc -n sources -v
    
  2. Collect TCP dump on client side and NTP server side or any intermediate network device:

    # tcpdump -s0 -i <interface> host <client-IP>  and  port 123 -w /tmp/ntp-server.pcap 
    # tcpdump -s0 -i <interface> port 123 -w /tmp/ntp-client.pcap
    
  3. Try to manually sync time with NTP server in debug mode without changing the time:

    # chronyd -Q -d 'server x.x.x.x iburst'
    
SBR
Components
Category
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.