CentOS7—時間同步(筆錄)
今天在學習etcd集群搭建時遇到時間不同步錯誤,故做筆記記錄一下,錯誤資訊如下:
與對等端47856ed020c3771a的時鐘差太大
2020-12-24 10:23:26.649584 W | rafthttp: the clock difference against peer 47856ed020c3771a is too high [4.070577968s > 1s] (prober "ROUND_TRIPPER_SNAPSHOT")
2020-12-24 10:23:31.650852 W | rafthttp: the clock difference against peer 47856ed020c3771a is too high [4.066382795s > 1s] (prober "ROUND_TRIPPER_RAFT_MESSAGE")

找到對應的節點:47856ed020c3771a ---- > 192.168.6.12:2380

1、安裝ntp服務
yum -y install ntp
2、設定時間
[root@hdss7-12 etcd]# ntpdate 0.asia.pool.ntp.org
24 Dec 10:34:57 ntpdate[1879]: step time server 45.76.111.149 offset -0.783300 sec
注:
這里主要就是通過時間服務器對系統時間進行同步,所以0.asia.pool.ntp.org并不是固定的,大家可以選擇time.nist.gov、time.nuri.net、0.asia.pool.ntp.org、1.asia.pool.ntp.org、2.asia.pool.ntp.org、3.asia.pool.ntp.org中任意一個,只要保證可用就OK,
3、將系統時間寫入硬體時間
hwclock --systohc
4、檢查ntp服務是否為開機自啟
[root@hdss7-12 etcd]# systemctl list-unit-files --type service |grep ntp
ntpd.service disabled
ntpdate.service disabled
5、設定為開機自啟
systemctl enable ntp
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/240587.html
標籤:區塊鏈
下一篇:Vue-cli安裝及使用
