我正在使用 Windows 10 并且我得到
Elasticsearch 异常 [type=validation_exception, reason=Validation Failed: 1: 此操作将添加 [2] 个总分片,但该集群当前有 [1000]/[1000] 个最大分片打开;]
我该如何解决这个问题?我不介意丢失数据,因为它只在本地运行。
cod*_*diz 25
除了上面提到的答案之外,您还可以尝试增加分片,直到尝试重新架构节点
curl -X PUT localhost:9200/_cluster/settings -H "Content-Type: application/json" -d '{ "persistent": { "cluster.max_shards_per_node": "3000" } }'
Run Code Online (Sandbox Code Playgroud)
CAUTION此外,以下内容可能很有用,当然应该继续进行
curl -XGET -u elasticuser:yourpassword http://localhost:9200/_cluster/health\?pretty | grep unassigned_shards
Run Code Online (Sandbox Code Playgroud)
(USE WITH CAUTION)curl -XGET -u elasticuser:yourpassword http://localhost:9200/_cat/shards | grep UNASSIGNED | awk {'print $1'} #(USE WITH CAUTION) | xargs -i curl -XDELETE -u elasticuser:yourpassword "http://localhost:9200/{}"
Run Code Online (Sandbox Code Playgroud)
小智 13
如果您不介意数据丢失,请删除旧索引。最简单的方法是从 GUI Kibana > Management > DevTools执行此操作,然后获取所有索引:
GET /_cat/indices/
Run Code Online (Sandbox Code Playgroud)
您可以在如下所示的模式内删除:
DELETE /<index-name>
Run Code Online (Sandbox Code Playgroud)
例如:
DELETE /logstash-2020-10*
Run Code Online (Sandbox Code Playgroud)
您已达到限制cluster.max_shards_per_node。添加更多数据节点或减少集群中的分片数量。
| 归档时间: |
|
| 查看次数: |
11562 次 |
| 最近记录: |