How to remove Elasticsearch node(s)
2792 단어 Elasticsearch키바나6.5.3
How to remove Elasticsearch node(s)
from Elasticsearch Master node
$ curl -X PUT localhost:9200/_cluster/settings -H 'Content-Type: application/json' -d '{
"transient" :{
"cluster.routing.allocation.exclude._ip" : "xxx.xxx.xxx.xxx"
}
}'
{"acknowledged":true,"persistent":{},"transient":{"cluster":{"routing":{"allocation":{"exclude":{"_ip":"xxx.xxx.xxx.xxx"}}}}}}
shutdown elasticsearch node to be removed
systemctl stop elasticsearch
edit /etc/elasticsearch/elasticsearch.yml
/etc/elasticsearch/elasticsearch.yml
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.zen.ping.unicast.hosts: ["host1", "host2"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
#
#discovery.zen.minimum_master_nodes:
set replica = 0!
curl -XPUT 'localhost:9200/_settings' -H 'Content-Type: application/json' -d '
{
"index" : {
"number_of_replicas" : 0
}
}'
{"acknowledged":true}
then repeat
$ curl -X PUT localhost:9200/_cluster/settings -H 'Content-Type: application/json' -d '{
"transient" :{
"cluster.routing.allocation.exclude._ip" : "yyy.yyy.yyy.yyy"
}
}'
{"acknowledged":true,"persistent":{},"transient":{"cluster":{"routing":{"allocation":{"exclude":{"_ip":"xxx.xxx.xxx.xxx"}}}}}}
shutdown elasticsearch node to be removed
systemctl stop elasticsearch
Reference
Reference
이 문제에 관하여(How to remove Elasticsearch node(s)), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/tkprof/items/524cdd60f47bdfb6c6d3텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)