Elastic Search – 403 – cluster_block_exception

I got an error while adding a new document to an existing index.

cluster_block_exception –  u’blocked by: [FORBIDDEN/12/index read-only / allow delete (api)]

Below are the put request I have tried to send

I resolved this error by sending a new put request to the products index( which are already created before) by updating the blocks.read_only_allow_delete to false.

Url you have to send the put request

http://localhost:9200/{{yourindex}}/_settings

In my case the index is products

http://localhost:9200/products/_settings

Body parameter that you are passing along with the request

{
“index”:{
“blocks.read_only_allow_delete”:false
}
}

After the successful request I got the exact result I am expected