Skip to main content

NTP synchronized cannot set to yes

· One min read

CentOS 7.5, 配置过 ntpd 与某个时间服务器同步后,偶然发现某一个节点的 NTP synchronized 一直是 no:

# timedatectl
Local time: 二 2019-07-30 09:41:08 CST
Universal time: 二 2019-07-30 01:41:08 UTC
RTC time: 二 2019-07-30 01:08:13
Time zone: Asia/Shanghai (CST, +0800)
NTP enabled: yes
NTP synchronized: no
RTC in local TZ: no
DST active: n/a

停掉 ntpd, 执行 ntpd -gq 重新调整时间后,再启动 ntpd:

# systemctl stop ntpd
# ntpd -gq
ntpd: time slew +0.000041s
# systemctl start ntpd

等待一会儿后,NTP synchronized 恢复成 yes:

# timedatectl
Local time: 二 2019-07-30 09:44:28 CST
Universal time: 二 2019-07-30 01:44:28 UTC
RTC time: 二 2019-07-30 01:44:28
Time zone: Asia/Shanghai (CST, +0800)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a

Ref: https://askubuntu.com/questions/929805/timedatectl-ntp-sync-cannot-set-to-yes

ClustrMaps