本地部署的tidb集群,突然出现tidb,pd,kv无法启动,初步猜测是centos的系统时间不一致导致无法启动

【 TiDB 使用环境】
生产环境
【 TiDB 版本】
v7.1.0
【复现路径】做过哪些操作出现的问题
对系统进行重启。

【遇到的问题:问题现象及影响】
tidb,pd,kv无法启动,pd、kv的日志都存在一个“system time jump backward”的错误,查看了系统日志为

[2023/10/31 16:42:22.651 +08:00] [ERROR] [systimemon.go:38] [“system time jump backward”] [last=1698741767902844769] [error=“[PD:common:ErrIncorrectSystemTime]incorrect system time”]
[2023/10/31 16:42:22.651 +08:00] [ERROR] [server.go:556] [“system time jumps backward”] [error=“[PD:common:ErrIncorrectSystemTime]incorrect system time”]
【资源配置】进入到 TiDB Dashboard -集群信息 (Cluster Info) -主机(Hosts) 截图此页面
【附件:截图/日志/监控】

操作系统上时间看看,是不是有滞后

tidb集群安装前需要配置各节点机器的时间同步,参考如下链接https://docs.pingcap.com/zh/tidb/stable/check-before-deployment的 的检测及安装 NTP 服务

就从上面的错误看着是时间错误,用的啥系统,国产系统?看下时区和时间对不对

有安装ntp么?

本地安装的centos7

安装了

那你每台用date命令看下机器的当前时间是否一致,或者ntpq -p看下同步状态

ntpq -p看下,另外是虚拟机吗

修改CPU时间源参数logs - Linux system time temporally jumps - Unix & Linux Stack Exchange

clocksource=    Override the default clocksource
                Format: <string>
                Override the default clocksource and use the clocksource
                with the name specified.
                Some clocksource names to choose from, depending on
                the platform:
                [all] jiffies (this is the base, fallback clocksource)
                [ACPI] acpi_pm
                ...
                [X86-64] hpet,tsc

cat /sys/devices/system/clocksource/clocksource*/available_clocksource

安装前检查了解一下
https://docs.pingcap.com/zh/tidb/stable/check-before-deployment

时间蛮重要的