Elasticsearch Cluster Blocks Read-Only

By Opster Team

Updated: Jan 28, 2024

| 2 min read

Overview

A read-only delete block can be applied automatically by the cluster because of a disk space issue, or may be applied manually by an operator to prevent indexing to the Elasticsearch cluster.

There are two types of block:

  • cluster.blocks.read_only
  • cluster.blocks.read_only_allow_delete

A read-only block is typically applied by an operator because some sort of cluster maintenance is taking place or in order to recover cluster stability.

A read-only allow delete block may be applied either automatically or by an operator because of a disk space issue.

How to resolve cluster.blocks.read_only

Check whether the cluster has been blocked via the settings:

GET _cluster/settings

There is probably a good reason why an operator took such an action, so do not remove it without some consideration.

PUT _cluster/settings
{
  "transient": {
   
    "cluster.blocks.read_only":null

  }
}

Index level read-only block

A read-only delete block may be applied to one or more individual indices. You can see where blocks have been applied here:

GET my_index/_settings

To remove the block from one index:

PUT my_index/_settings
{
  "index": {
	"blocks": {
  	"read_only": "false"
	}
  }
}

To remove the block from all indices:

PUT _all/_settings
{
  "index": {
	"blocks": {
  	"read_only": "false"
	}
  }
}

How to resolve cluster.blocks.read_only_allow_delete

Check whether the cluster has been blocked via the settings:

GET _cluster/settings

There is probably a good reason why an operator took such an action, so do not remove it without some consideration.

PUT _cluster/settings
{
  "transient": {
   
    "cluster.blocks.read_only_allow_delete":null

  }
}

Index level read-only delete block

A read-only delete block may be applied to one or more individual indices. You can see where blocks have been applied here:

GET my_index/_settings

To remove the block from one index:

PUT my_index/_settings
{
  "index": {
	"blocks": {
  	"read_only_allow_delete": "false"
	}
  }
}

To remove the block from all indices:

PUT _all/_settings
{
  "index": {
	"blocks": {
  	"read_only_allow_delete": "false"
	}
  }
}

Opster
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.