linux 下consul 相關

1、Multiple private IPv4 addresses found. Please configure one with ‘bind’ and/or ‘advertise’.

出現這個問題的原因是,有多張網卡,所以就有了多個ip4的地址,解決方案,就是綁定ip地址到局域網卡,

加上 -bind 192.168.xxx.xxx  參數即可

2. data_dir cannot be empty

consul agent -server運行的時候需要指定 data_dir

格式如下

consul agent -server  -bind 192.168.153.130 -client 0.0.0.0 -ui -data-dir=/usr/bin/data

 

3.consul ui界面只能在本機訪問,不能在其他電腦訪問的解決辦法,啓動方法如下

consul agent -dev  -client 0.0.0.0 -ui

4.刪除無效的實例節點

 

paas-portal-sit-9003 (服務名稱id)

curl http://server_ip:8500/v1/agent/service/deregister/paas-portal-sit-9003 -X PUT

節點刪除

4b36b27317a0(節點ID)

http://server_ip:8500/v1/agent/force-leave/4b36b27317a0
 

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