告警:HEALTH_WARN clock skew detected on mon.ip-10-25-195-6; 8 requests are blocked > 32 sec; Monitor clock skew detected
原因:
MON可能被MON節點之間的重要的時鍾偏移激烈的影響。這經常會轉變為沒有明顯原因的詭異的行為。為了避免這種問題,你應該在MON節點上運行一個時間同步的工具。
默認最大容忍的時鍾偏移為0.05s,不建議修改這個官方開發推薦值。私自未經測試修改雖然無數據丟失風險,可能會對MON集群和總體集群健康導致意外的作用。
如果你遇到這個告警,同步時鍾,在MON上運行NTP的客戶端會有幫助。如果經常遇到這個問題,可能是因為使用了遠端的NTP服務器,請考慮在內網部署NTP服務器。
在MON/OSD/RGW節點部署NTP服務的操作步驟:
1. apt-get install ntp
2. 修改ntp配置 /etc/ntp.conf
3. 重啟ntp服務
/etc/ntp.conf
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help #sync time interval tinker step 0.5 driftfile /var/lib/ntp/ntp.drift # Enable this if you want statistics to be logged. #statsdir /var/log/ntpstats/ statistics loopstats peerstats clockstats filegen loopstats file loopstats type day enable filegen peerstats file peerstats type day enable filegen clockstats file clockstats type day enable # Specify one or more NTP servers. # Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board # on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for # YY NTP servers server 121.14.36.27 iburst server 221.228.209.14 iburst server 183.57.81.221 iburst server 113.142.33.209 iburst server 106.38.198.9 iburst # Use Ubuntu's ntp server as a fallback. #pool ntp.ubuntu.com # Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for # details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions> # might also be helpful. # # Note that "restrict" applies to both servers and clients, so a configuration # that might be intended to block requests from certain clients could also end # up blocking replies from your own upst