问题:
kudu 进程运行一段时候后突然宕掉,查看日志出现clock error:
Sep 17, 8:32:31.135 PM FATAL tablet_server_main.cc:38 Check failed: _s.ok() Bad status: Service unavailable: Cannot initialize clock: Cannot initialize HybridClock. Clock synchronized but error was too high (11711000 us).
原因:
kudu 对同步时间比较敏感,可使用
ntptime
查看服务器ntp时间,注意ntp同步时间和系统时间是不一样的,ntp需要重ntp服务器 同步获取时间,然后再和系统时间校准;
解决:
调整参数相关参数(默认10s,可改为20s)
--max_clock_sync_error_usec = 20000000
或者使用 chronyd 做时间同步;
参考:
https://github.com/apache/kudu/blob/master/docs/troubleshooting.adoc#ntp