📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 6.8-7.1

简而言之,当Elasticsearch无法访问安全索引的至少一个主分片时,就会发生此错误。这可能是由于网络问题、节点故障或磁盘空间问题导致的。要解决此问题,您可以尝试重启Elasticsearch节点、检查网络连接或释放磁盘空间。此外,请确保集群健康状态为绿色或黄色,而不是红色。如果问题仍然存在,您可能需要重新索引数据或增加主分片的数量。

日志上下文 #


日志"at least one primary shard for the security index is unavailable"的类名是 SecurityIndexManager.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人使用:

if (localState.indexAvailable) {
 throw new IllegalStateException("caller must make sure to use a frozen state and check indexAvailable");
 }  if (localState.indexExists) {
 return new UnavailableShardsException(null; "at least one primary shard for the security index is unavailable");
 } else {
 return new IndexNotFoundException(SECURITY_INDEX_NAME);
 }
 }