Search This Blog

Tuesday, October 11, 2022

Fix Ubuntu/Debian server [Systemd Timesyncd Time] checkmk alert [Cannot reasonably calculate time since last synchronization (hosts time is running ahead)]

My checkmk server through alert on Ubuntu/Debian servers: Cannot reasonably calculate time since last synchronization (hosts time is running ahead)
# systemctl status systemd-timesyncd.service
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
  Drop-In: /usr/lib/systemd/system/systemd-timesyncd.service.d
           └─disable-with-time-daemon.conf
   Active: active (running) since Mon 2022-09-26 17:47:50 EDT; 2 weeks 1 days ago
     Docs: man:systemd-timesyncd.service(8)
 Main PID: 443 (systemd-timesyn)
   Status: "Synchronized to time server for the first time 208.81.1.244:123 (0.debian.pool.ntp.org)."
    Tasks: 2 (limit: 4722)
   Memory: 1.7M
   CGroup: /system.slice/systemd-timesyncd.service
           └─443 /lib/systemd/systemd-timesyncd

Sep 26 17:47:50 Minecraft systemd[1]: Starting Network Time Synchronization...
Sep 26 17:47:50 Minecraft systemd[1]: Started Network Time Synchronization.
Sep 26 17:47:50 Minecraft systemd-timesyncd[443]: Synchronized to time server for the first time 208.81.1.244:123 (0.debian.pool.ntp.org).
Update the configuration: /etc/systemd/timesyncd.conf
[Time]
NTP=ca.pool.ntp.org
FallbackNTP=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org
RootDistanceMaxSec=5
PollIntervalMinSec=32
PollIntervalMaxSec=2048
Restart the systemd-timesyncd.service
root@Minecraft:~# systemctl restart systemd-timesyncd.service
root@Minecraft:~# systemctl status systemd-timesyncd.service
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
  Drop-In: /usr/lib/systemd/system/systemd-timesyncd.service.d
           └─disable-with-time-daemon.conf
   Active: active (running) since Tue 2022-10-11 20:11:36 EDT; 3s ago
     Docs: man:systemd-timesyncd.service(8)
 Main PID: 1796 (systemd-timesyn)
   Status: "Synchronized to time server for the first time 209.115.181.110:123 (ca.pool.ntp.org)."
    Tasks: 2 (limit: 4722)
   Memory: 1.3M
   CGroup: /system.slice/systemd-timesyncd.service
           └─1796 /lib/systemd/systemd-timesyncd

Oct 11 20:11:36 Minecraft systemd[1]: Starting Network Time Synchronization...
Oct 11 20:11:36 Minecraft systemd[1]: Started Network Time Synchronization.
Oct 11 20:11:36 Minecraft systemd-timesyncd[1796]: Synchronized to time server for the first time 209.115.181.110:123 (ca.pool.ntp.org).

No comments:

Post a Comment