Elasticsearch error: cluster_block_exception [FORBIDDEN/12/index read-only / allow delete (api)]
This error occurs when disk space is less than 5% so Elastic search allow only read mode. If you try to write than we will get this error.
Solution:
free up disk space: Freeing up enough disk space so that more than 5% of the disk is free will solve this problem. Elastic search won't automatically take itself out of read-only mode once enough disk is free though, you'll have to do something like this to unlock the indices:
$ curl -XPUT -H "Content-Type: application/json" https://[YOUR_ELASTICSEARCH_ENDPOINT]:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
df -h -- this is use to find disk space.