Clock skew between client hosts and the cluster
System clock skew on the host where a client application (SDK or CLI) runs can cause authentication errors. This is especially common when obtaining a token via IAM with a service account key (Service Account Key), where the token includes time from the host.
The Healthcheck NODES_TIME_DIFFERENCE compares system time across cluster nodes. It does not check time on client application hosts. Therefore, if Healthcheck reports no issues but authentication errors occur only for some clients, check the system time on those client hosts.
Symptoms
- Errors during authentication with a service account key. The client (SDK or CLI) builds a JWT to request a token and sets the current time from the host system clock in that JWT. If the clock is ahead or behind, IAM may reject the token request.
- Authentication errors during token refresh: if the SDK decides when to refresh a token based on the local clock, a lagging clock may cause the client to send an already expired token to the cluster.
Such errors often occur only on some hosts — for example, on new machines or in environments without configured time synchronization.
Diagnostics
Using chrony
chrony is an NTP client.
To check time synchronization on the client host, run:
chronyc tracking
chronyc sources -v
In chronyc tracking, check:
System time— the current offset of the system clock relative to the NTP clock ofchrony(in seconds).Leap status— the leap second and clock synchronization status. In the normal state the value isNormal(no warning). TheNot synchronisedvalue meanschronydoes not consider the clock synchronized.Reference ID— the ID and name (or IP address) of the synchronization source. IfReference ID = 7F7F0101and no name or IP address is shown,chronyis in local mode without external synchronization.
Example chronyc tracking output
Reference ID : CB00710F (ntp1.example.net)
Stratum : 3
Ref time (UTC) : Fri Jan 23 09:49:17 2026
System time : 0.000006523 seconds slow of NTP time
Last offset : -0.000006747 seconds
RMS offset : 0.000035822 seconds
Frequency : 3.225 ppm slow
Residual freq : -0.000 ppm
Skew : 0.129 ppm
Root delay : 0.013639022 seconds
Root dispersion : 0.001100737 seconds
Update interval : 64.2 seconds
Leap status : Normal
In chronyc sources -v:
- Find the source marked
*in columnS: it is selected for synchronization. - Verify that it is the expected time source: compare it with the source in the
chronyconfiguration on that host.
Example chronyc sources -v output
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
#* GPS0 0 4 377 11 -479ns[ -621ns] +/- 134ns
^? ntp1.example.net 2 6 377 23 -923us[ -924us] +/- 43ms
^+ ntp2.example.net 1 6 377 21 -2629us[-2619us] +/- 86ms
Using timedatectl
timedatectl is a systemd utility for system clock status.
On hosts with systemd, run:
timedatectl status
In the output, check these lines and their values:
System clock synchronized: yesNTP service: active
Example timedatectl status output
Local time: Thu 2026-09-17 16:08:56 CEST
Universal time: Thu 2026-09-17 14:08:56 UTC
RTC time: Thu 2026-09-17 14:08:56
Time zone: Europe/Warsaw (CEST, +0200)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
Note
If neither chrony nor timedatectl is available, check time synchronization with the NTP client or platform tools used in your environment. For example, if ntpd is installed:
ntpq -p
The command lists the NTP servers the client is connected to and their status. The source marked * is the current synchronization source (system peer).
Recommendations
The primary fix is to synchronize the system clocks.
Configure time synchronization on client hosts with chrony or ntpd and multiple NTP sources from your environment. For configuration examples, see NTP configuration examples.
See also
A one-second adjustment of UTC by ±1 second to keep the timescale aligned with Earth’s rotation.