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

版本: 7.13-8.9

简而言之,当 Elasticsearch 无法找到任何活动的主分片时,就会出现此错误。这可能是由于多种原因造成的,例如网络问题、磁盘空间问题或节点故障。要解决此问题,你可以尝试重启 Elasticsearch 集群、检查是否存在网络问题、确保有足够的磁盘空间,或检查节点的健康状况。如果问题仍然存在,你可能需要重新索引数据。

日志上下文 #

日志"Primary shards were not active [shards={}; active={}]“的类名是 GetGlobalCheckpointsAction.java。我们从 Elasticsearch 源代码中提取了以下内容,为那些寻求深入上下文的人提供参考:

handleIndexNotReady(state; request; listener);
} else {
    int active = routingTable.primaryShardsActive();
    int total = indexMetadata.getNumberOfShards();
    listener.onFailure(
        new UnavailableShardsException(null; "Primary shards were not active [shards={}; active={}]"; total; active)
    );
}
}
}