Elasticsearch Cluster Blocks Read-Only

Elasticsearch Cluster Blocks Read-Only

Last Update: July 2020

Have you tried our Elasticsearch Check-Up ? (no installation required) get personalized recommendations that can prevent errors and improve your search and indexing speed

An Explanation On cluster.blocks.read_only  & cluster.blocks.read_only_allow_delete

What Does it Mean?

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

About Opster

Opster takes a different approach to Elasticsearch operation - Opster pro-actively troubleshoots, optimizes, automates and assists in what's needed to run Elasticsearch smoothly in production.


« Back to Index