Chronyd is not synchronizing with NTP server
Environment
- Red Hat Enterprise Linux (RHEL)
- 7
- 8
- 9
- Chronyd
Issue
-
Message "
Can't synchronise: no selectable sources" is shown inchronydservice. -
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 -
Reachvalue of0indicates 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
123on NTP servers.
Diagnostic Steps
-
Collect
chronydsource status:# chronyc -n sources -v -
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 -
Try to manually sync time with NTP server in debug mode without changing the time:
# chronyd -Q -d 'server x.x.x.x iburst'
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.