現象:某節點加入集羣成功,訪問新加節點的ui報500
具體現象:使用consul join命令成功加入集羣,用consul members能查到節點,用./consul operator raft -list-peers查詢沒有剛加入的節點
恢復步驟:三臺機器進入consul_data/raft/snapshots/,然後進入最新的鏡像目錄,編輯meta.json,增加未能加入的節點
手動增加好Configuration節點信息
"Configuration":{"Servers":[{"Suffrage":0,"ID":"10.12.3.23:8300","Address":"10.12.3.23:8300"},{"Suffrage":0,"ID":"10.31.2.18:8300","Address":"10.31.2.18:8300"},{"Suffrage":0,"ID":"10.31.2.19:8300","Address":"10.31.2.19:8300"}]}
啓動一臺節點,
./consul agent -server -data-dir=/home/gcop/consul_data -bootstrap-expect 1 -node=node18 -bind=10.31.2.18 -client=0.0.0.0 -ui &
啓動兩外兩臺節點
./consul agent -server -data-dir=/home/gcop/consul_data -bootstrap-expect 1 -node=node19 -bind=10.31.2.19 -client=0.0.0.0 -join=10.31.2.18 -ui &