我为elasticsearch开发了一个搜索插件,但在升级这个插件时,我需要一个接一个地关闭节点,每次我都要等待很长时间的重新分配过程。在文件中,它说重新分配过程可以通过以下方式停止:
curl -XPUT localhost:9200/_cluster/settings -d '{
"transient" : {
"cluster.routing.allocation.enable" : "none"
}
}'当我运行这个命令时,我得到了以下错误:
ElasticsearchIllegalArgumentException[Can't update non dynamic settings[[index.transient.cluster.routing.allocation.enable]] for open indices[..]我能做什么?
顺便说一句:对不起,我的英语很差……
发布于 2015-04-03 21:00:51
就差那么一点!
尝试:
curl -XPUT 'http://localhost:9200/_cluster/settings' -d '{
"transient" : {
"cluster.routing.allocation.disable_allocation": "true"
}}'发布于 2019-05-18 03:48:13
OP可能使用较旧的Elasticsearch版本,不支持动态更新"cluster.routing.allocation.enable“和/或"cluster.routing.rebalance.enable”。
然而,在较新的Elasticsearch版本中,这两个设置应该是dynamic或transient,而不是static或persistent。
以下是Elasticsearch当前文档中有关分片分配设置的更多详细信息。
https://www.elastic.co/guide/en/elasticsearch/reference/current/shards-allocation.html
用户可以在Kibana开发工具控制台中应用/撤销这些设置,如下所示
PUT _cluster/settings
{
"transient" : {
"cluster.routing.allocation.enable": "none",
"cluster.routing.rebalance.enable" : "none"
}
}
# After bouncing ES cluster
PUT _cluster/settings
{
"transient" : {
"cluster.routing.allocation.enable": "all",
"cluster.routing.rebalance.enable" : "all"
}
}https://stackoverflow.com/questions/29408834
复制相似问题