ES不能创建索引问题修护

今天突然发现kibana里面没有日志展示了,登录ES服务器发现报错如下:

[2019-12-19T10:14:00,620][WARN ][o.e.x.m.e.l.LocalExporter] [ws-node1] unexpected error while indexing monitoring document
org.elasticsearch.xpack.monitoring.exporter.ExportException: [.monitoring-es-7-2019.12.19] IndexCreationException[failed to create index [.monitoring-es-7-2019.12.19]]; nested: ValidationException[Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [999]/[1000] maximum shards open;];
at org.elasticsearch.xpack.monitoring.exporter.local.LocalBulk.lambda$throwExportException$2(LocalBulk.java:125) ~[?:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_181]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0_181]


重点:ValidationException[Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [999]/[1000] maximum shards open;,ES7以上的版本默认就允许创建1000个分片,所以就报错了,我们可以在kibana tools上调大分片的配置:

PUT /_cluster/settings
{
"transient": {
"cluster": {
"max_shards_per_node":10000
}
}
}

如下图:

运行后,分片默认则为10000了,在看kibana面包,日志恢复:


原文链接:https://blog.csdn.net/liuxuango/article/details/103609862

原文地址:https://www.cnblogs.com/cheyunhua/p/14836952.html