Read only add block index request failed to be acknowledged – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.11-8.9

Briefly, this error occurs when Elasticsearch enters a read-only mode due to low disk space. Elasticsearch automatically sets the index to read-only to prevent data loss when disk space is critically low. To resolve this issue, you can either free up disk space or change the cluster settings. To change the settings, use the Elasticsearch API to set the “cluster.routing.allocation.disk.watermark.flood_stage” to a higher value or disable it. However, be cautious as this could lead to data loss if the disk becomes full.

This guide will help you check for common problems that cause the log ” read only add block index request failed to be acknowledged ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, index, request.

Log Context

Log “read only add block index request failed to be acknowledged” class name is ReadOnlyStep.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 .execute(
 AddIndexBlockAction.INSTANCE;
 new AddIndexBlockRequest(WRITE; indexMetadata.getIndex().getName()).masterNodeTimeout(TimeValue.MAX_VALUE);
 listener.delegateFailureAndWrap((l; response) -> {
 if (response.isAcknowledged() == false) {
 throw new ElasticsearchException("read only add block index request failed to be acknowledged");
 }
 l.onResponse(null);
 })
 );
 }

 

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?