Closing indices – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-7.15

Briefly, this error occurs when Elasticsearch is in the process of shutting down or closing certain indices due to various reasons such as low disk space, read-only indices, or during a cluster restart. To resolve this issue, you can either free up disk space, change the index from read-only to read-write, or ensure that the cluster restart is completed successfully. Additionally, you can also use the Elasticsearch API to manually open the closed indices.

This guide will help you check for common problems that cause the log ” closing indices {} ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: cluster, indices, metadata.

Log Context

Log “closing indices {}” classname is MetadataIndexStateService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

            assert Strings.hasLength(indexBlock.uuid()) : "Closing block should have a UUID";
            blocks.addIndexBlock(index.getName(); indexBlock);
            blockedIndices.put(index; indexBlock);
        }

        logger.info(() -> new ParameterizedMessage("closing indices {}";
            blockedIndices.keySet().stream().map(Object::toString).collect(Collectors.joining(";"))));
        return ClusterState.builder(currentState).blocks(blocks).metadata(metadata).routingTable(routingTable.build()).build();
    }

    /**

 

 [ratemypost]