I'm using the Dev Tools in Kibana 6.8 to delete docs by query but I received a 403 with the type "cluster_block_exception", reason "blocked by: [FORBIDDEN/8/index write (api)];".
I used the following command:
curl -XPOST "http://localhost:9200/my_index/_delete_by_query" -H 'Content-Type: application/json' -d'
{
"query": {
"match_all": {}
}
}'
Here's a sample response:
{
"took": 26,
"timed_out": false,
"total": 2,
"deleted": 0,
"batches": 1,
"version_conflicts": 0,
"noops": 0,
"retries": {
"bulk": 0,
"search": 0
},
"throttled_millis": 0,
"requests_per_second": -1,
"throttled_until_millis": 0,
"failures": [
{
"index": "my_index",
"type": "doc",
"id": "TnOKCHMBlyetxY-P6HZ_",
"cause": {
"type": "cluster_block_exception",
"reason": "blocked by: [FORBIDDEN/8/index write (api)];"
},
"status": 403
},
{
"index": "my_index",
"type": "doc",
"id": "T3OKCHMBlyetxY-P6XYF",
"cause": {
"type": "cluster_block_exception",
"reason": "blocked by: [FORBIDDEN/8/index write (api)];"
},
"status": 403
}
]
}
Any help on how to set the proper permissions would be greatly appreciated. Thanks.
You could try to first change the state of the index with this request :
PUT /my_index/_settings { "index": { "blocks": { "write": "false" } } }
And in second time, you have to identify which cause this state of index (indices policy, FileSystem : "low watermark" of 85%?)