【发布时间】:2018-01-09 18:38:47
【问题描述】:
我在 AWS Elasticsearch 上有一个索引,由于 NODE_LEFT 而没有被评估。这是_cat/shards的输出
rawindex-2017.07.04 1 p STARTED
rawindex-2017.07.04 3 p UNASSIGNED NODE_LEFT
rawindex-2017.07.04 2 p STARTED
rawindex-2017.07.04 4 p STARTED
rawindex-2017.07.04 0 p STARTED
在正常情况下,使用_cluster 或_settings 很容易重新分配这些分片。但是,这些正是 AWS 不允许的 API。我收到以下消息:
{
Message: "Your request: '/_settings' is not allowed."
}
根据an answer to a very similar question,我可以使用AWS允许的_index API更改索引的设置。但是,index.routing.allocation.disable_allocation 似乎对我正在运行的 Elasticsearch 5.x 无效。我收到以下错误:
{
"error": {
"root_cause": [
{
"type": "remote_transport_exception",
"reason": "[enweggf][x.x.x.x:9300][indices:admin/settings/update]"
}
],
"type": "illegal_argument_exception",
"reason": "unknown setting [index.routing.allocation.disable_allocation] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
},
"status": 400
}
我尝试使用高 index.priority 优先考虑索引恢复并将 index.unassigned.node_left.delayed_timeout 设置为 1 分钟,但我无法重新分配它们。
有什么方法(肮脏或优雅)可以在 AWS 托管的 ES 上实现这一点?
谢谢!
【问题讨论】:
-
由于 AWS ES 及其有限的灵活性,如果已经有此索引的备份,我会解决此问题的一种方法是删除索引并从备份中恢复它。将分配所有分片。
标签: amazon-web-services elasticsearch sharding elasticsearch-5