NTP Errors
Luke Hebert
- 3 minutes read - 450 wordsClock drift is one of those quiet problems that snowballs into data inconsistencies, failed Kerberos tickets, and log entries that jump around in time. The NTP host health test exists to catch that drift early, before it becomes a cluster-wide headache. This guide covers what the test checks, how to read its output, and the specific commands you need to diagnose and fix synchronization failures.
What the Test Checks
This is a host health test that verifies the host’s system clock is in sync with its NTP server(s). It checks that the absolute value of the host’s clock offset, as reported by the ntpdc -np command, is not too large. The test returns a “Bad” health status if any of the following occur:
- The
ntpdc -npcommand fails. - NTP is not synchronized to a server.
- The host’s NTP daemon is not running or cannot be contacted.
Reading the Output
The ntpdc -np output contains a row for each NTP server candidate. If no row starts with a *, it means there is no valid NTP server peer to synchronize time with. Communication errors and validation test failures, such as a too-large offset between the peer and the host time, are examples of conditions that can lead to this state.
Troubleshooting Steps
Check the firewall. Make sure UDP port 123 is open if a firewall is in use.
Review system logs. Look for
ntpdmessages related to configuration errors.Verify packet flow. Use the following command to confirm packets are being sent and received between peers:
ntpdc -c iostatInspect peer details. Run the following to get more information about the conditions of each peer:
ntpq -c asThe output includes an association ID that you can use with the next command to retrieve detailed status for a specific peer:
ntpq -c "rv <association_id>"For example:
ntpq -c "rv 48548"Get a peer summary. This command returns a summary of all peers and the reason they are not in use:
ntpq -c pe
Interpreting Stratum Values
A stratum value above 16 means the peer is out of sync. If you see this in your output, the host is not receiving a reliable time source and the NTP configuration needs attention.
Disabling the Check
If NTP is intentionally not in use on a particular host, disable this health check for that host using the configuration options in your cluster management tool. Cloudera recommends using NTP for time synchronization of Hadoop clusters, so disabling the check should be a deliberate decision.
A failure of this health test may indicate a problem with the host’s NTP service or configuration. Resolve the underlying synchronization issue before dismissing the alert.