consul增刪節點無法正常訪問集羣問題

現象:某節點加入集羣成功,訪問新加節點的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 &

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章