GrepBoard/Manuals
605 manuals ·

Fix Ceph MON_CLOCK_SKEW "clock skew detected on mon"

·Tested on Ceph Squid 19.2 official docs and source · chrony 4.5 docs · 2026-10·Test scope ↓·6 steps

Ceph MON_CLOCK_SKEW means a monitor's clock is over 0.05 s off the leader even after subtracting latency. Find the host with time-sync-status and fix chrony.

output
[WRN] MON_CLOCK_SKEW: clock skew detected on mon.c    mon.c clock skew <skew>s > max 0.05s (latency <latency>s)

clock skew detected on mon.X means that monitor's clock is off from the leader monitor by more than the limit (default 0.05 s) even after subtracting the round-trip latency. The fix is repairing time sync (chrony or similar) on that host, not raising the limit. The block above is the format the Squid (v19.2.7) source uses for this warning in ceph health detail, with seconds in place of <skew> and <latency> ([HealthMonitor.cc L571-L576 and L860-L890](https://github.com/ceph/ceph/blob/v19.2.7/src/mon/HealthMonitor.cc#L860-L890)). When several monitors are affected, the first line lists them as mon.a, mon.c and there is one detail line per monitor. The example in the Squid docs, mon.c addr 192.0.2.10:6789/0 clock skew 0.08235s > max 0.05s (latency 0.0045s) (address replaced), is an older format that includes the address, so its text differs from what the v19.2.7 source prints; the numbers mean the same thing. The limit is the mon_clock_drift_allowed setting.

[1] Find which monitor is off and by how much. Everything here is read-only.

console
$ ceph health detail$ ceph time-sync-status

time-sync-status prints JSON with skew, latency and health per monitor, plus details when it is in a warning state ([Monitor.cc L3685-L3717, v19.2.7](https://github.com/ceph/ceph/blob/v19.2.7/src/mon/Monitor.cc#L3685-L3717)). The warning text clock skew …s > max …s comes from the same source ([timecheck_status L5115-L5130](https://github.com/ceph/ceph/blob/v19.2.7/src/mon/Monitor.cc#L5115-L5130)).

[2] Remember that the reference is the leader monitor. The docs say reported offsets are relative to the lead monitor, which always shows 0. In the source, the leader computes the skew from the difference between another monitor's reply timestamp and its own clock, minus the round-trip latency ([handle_timecheck_leader L5205-L5237](https://github.com/ceph/ceph/blob/v19.2.7/src/mon/Monitor.cc#L5205-L5237)). That changes how you read it.

What you seeWhere to look
Only one monitor warnedThat monitor's host
Every monitor except the leader warned, all in the same directionThe leader's host clock

Find the current leader in the quorum_leader_name field of quorum_status ([_quorum_status L2678](https://github.com/ceph/ceph/blob/v19.2.7/src/mon/Monitor.cc#L2678)).

console
$ ceph quorum_status

[3] Check chrony on the suspect host. If you use chrony, run these on each monitor host.

console
$ chronyc tracking$ chronyc sources

Per the chrony docs, System time in tracking is the current offset between the NTP clock and the system clock, and Leap status of Not synchronised means it is not in sync. In sources, * marks the source currently used for synchronisation and ? marks one that cannot be selected. With no * at all there is nothing to sync against, so first check that the server or pool entries in the chrony configuration are reachable from that host.

[4] Bring the time setup in line with the Ceph recommendations:

  • Run Chrony (or the legacy ntpd) on every monitor node, with the iburst option.
  • Give each monitor several peers: the other monitors, internal NTP servers, and multiple external public pool servers.
  • Sync all nodes in the cluster, not just monitors, against internal and external servers.
  • Run NTP servers on bare metal. The docs say virtualized clocks are not suitable for steady timekeeping.

[5] Confirm the warning clears. Per the option descriptions, clocks are checked every mon_timecheck_interval (default 5 minutes) normally and every mon_timecheck_skew_interval (default 30 seconds) while a skew is believed to exist ([mon.yaml.in L647-L668](https://github.com/ceph/ceph/blob/v19.2.7/src/common/options/mon.yaml.in#L647-L668)). After fixing the clock, wait about a minute and run ceph time-sync-status again.

[6] Do not raise the limit.

console
$ ceph config get mon mon_clock_drift_allowed

The default is 0.05 seconds ([mon.yaml.in L628-L635](https://github.com/ceph/ceph/blob/v19.2.7/src/common/options/mon.yaml.in#L628-L635)). The docs call changing it "almost certainly a bad idea", because clock-skewed monitors cannot be relied upon. The health check docs add that it must stay significantly below mon_lease (default 5 seconds) for the monitor cluster to work. The command above only reads the value. If someone already changed it, restore the default with ceph config rm mon mon_clock_drift_allowed.

For other warning codes, see ceph health detail: read the output and HEALTH_WARN codes.

#ceph#mon#clock-skew#chrony#ntp