How to undo setting Elasticsearch Index to readonly?

Answers are really old so I’ll add a elastic-6+ answer too:

PUT /[_all|<index-name>]/_settings
{
  "index.blocks.read_only_allow_delete": null
}

https://www.elastic.co/guide/en/elasticsearch/reference/6.x/disk-allocator.html

FYI (for context): I ran into read-only indices due to running out of disk and got error messages from logstash:

...retrying failed action with response code: 403 ({"type"=>"cluster_block_exception", "reason"=>"blocked"

elasticsearch:
ClusterBlockException[blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];]

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)