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

版本: 7.11-8.9

简而言之,当Elasticsearch由于阻塞而无法写入元数据时,就会出现此错误,通常是由于磁盘已满或索引为只读造成的。要解决此问题,您可以释放磁盘空间或增加磁盘容量。如果索引是只读的,您可以更新索引设置以允许写入。此外,检查是否有任何正在进行的操作可能正在阻止元数据写入并解决它们。

日志上下文 #

日志“waiting until metadata writes are unblocked”的类名是 LocalExporter.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入理解的人参考:

ClusterState clusterState = clusterService.state();
if (clusterState.nodes().isLocalNodeElectedMaster()) {
    // we are on the elected master
    // Check that there is nothing that could block metadata updates
    if (clusterState.blocks().hasGlobalBlockWithLevel(ClusterBlockLevel.METADATA_WRITE)) {
        throw new ElasticsearchException("waiting until metadata writes are unblocked");
    }  // We haven't blocked off other resource installation from happening. That must be done first.
    assert migrationCoordinator.canInstall() == false : "migration attempted while resources could be erroneously installed";