Waiting until metadata writes are unblocked – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.11-8.9

Briefly, this error occurs when Elasticsearch is unable to write metadata due to a blockage, often caused by a full disk or a read-only index. To resolve this issue, you can free up disk space or increase the disk capacity. If the index is read-only, you can update the index settings to allow writes. Additionally, check for any ongoing operations that might be blocking metadata writes and resolve them.

This guide will help you check for common problems that cause the log ” waiting until metadata writes are unblocked ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, metadata.

Log Context

Log “waiting until metadata writes are unblocked” class name is LocalExporter.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 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";


How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?