# Delete by query api - ClusterBlockException\[blocked by: \[FORBIDDEN/8/index write (api)\];\] status": 403

**URL:** <https://discuss.elastic.co/t/delete-by-query-api-clusterblockexception-blocked-by-forbidden-8-index-write-api-status-403/21082>\
**Category:** Elasticsearch\
**Created:** [December 4, 2014, 1:54pm UTC](https://discuss.elastic.co/t/delete-by-query-api-clusterblockexception-blocked-by-forbidden-8-index-write-api-status-403/21082 "2014-12-04T13:54:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmiles\_mail](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@pmiles\_mail](https://discuss.elastic.co/u/pmiles_mail)\
**Post date:** [December 4, 2014, 1:54pm UTC](https://discuss.elastic.co/t/delete-by-query-api-clusterblockexception-blocked-by-forbidden-8-index-write-api-status-403/21082/1 "2014-12-04T13:54:01Z")

</div>

Hi,

I'm trying to delete data by query from our elastic search cluster. If i  
run the delete on the current active index it works fine.

However if i try to run the delete against an older index ( which is still  
open ) I get an exception.

{  
"error": "ClusterBlockException[blocked by: [FORBIDDEN/8/index write  
(api)];]",  
"status": 403  
}

The query is [http://1.2.3.4:9200/graylog2\_102/message/\_query](http://1.2.3.4:9200/graylog2_102/message/_query)

{  
"size": 3,  
"query": {  
"match": {"message": "apples"}  
}}

Can you advise on how to delete these specifc 'apple' messages without  
deleting the whole index ?

Thanks

Paul.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e1807c73-3edd-4a86-b419-2197a0d95e30%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e1807c73-3edd-4a86-b419-2197a0d95e30%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![pmiles\_mail](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@pmiles\_mail](https://discuss.elastic.co/u/pmiles_mail)\
**Post date:** [December 8, 2014, 9:55am UTC](https://discuss.elastic.co/t/delete-by-query-api-clusterblockexception-blocked-by-forbidden-8-index-write-api-status-403/21082/2 "2014-12-08T09:55:59Z")

</div>

Does anyone have any experience of this problem ?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/70d27670-a9f3-43a5-b6ab-2f0c93e2b5ba%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/70d27670-a9f3-43a5-b6ab-2f0c93e2b5ba%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![pmiles\_mail](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@pmiles\_mail](https://discuss.elastic.co/u/pmiles_mail)\
**Post date:** [December 9, 2014, 4:21pm UTC](https://discuss.elastic.co/t/delete-by-query-api-clusterblockexception-blocked-by-forbidden-8-index-write-api-status-403/21082/3 "2014-12-09T16:21:48Z")

</div>

Bump... Anyone ?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/53b9506b-78c9-4219-b46b-86b4125a42ae%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/53b9506b-78c9-4219-b46b-86b4125a42ae%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![magicalbob](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@magicalbob](https://discuss.elastic.co/u/magicalbob)\
**Post date:** [December 9, 2015, 9:12am UTC](https://discuss.elastic.co/t/delete-by-query-api-clusterblockexception-blocked-by-forbidden-8-index-write-api-status-403/21082/4 "2015-12-09T09:12:53Z")

</div>

Did you get an answer to this? I've just had the same {"error":"ClusterBlockException[blocked by: [FORBIDDEN/8/index write (api)];]","status":403} response .....

---

<div class="post-metadata">

**Author:** ![n4nagappan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/n4nagappan/32/6687_2.png) [@n4nagappan](https://discuss.elastic.co/u/n4nagappan)\
**Post date:** [December 17, 2015, 7:44am UTC](https://discuss.elastic.co/t/delete-by-query-api-clusterblockexception-blocked-by-forbidden-8-index-write-api-status-403/21082/5 "2015-12-17T07:44:00Z")

</div>

Came across the same issue. Any solution yet ?

Request to Elasticsearch failed: "ClusterBlockException[blocked by: [FORBIDDEN/8/index write (api)];]"

---

<div class="post-metadata">

**Author:** ![n4nagappan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/n4nagappan/32/6687_2.png) [@n4nagappan](https://discuss.elastic.co/u/n4nagappan)\
**Post date:** [December 17, 2015, 8:09am UTC](https://discuss.elastic.co/t/delete-by-query-api-clusterblockexception-blocked-by-forbidden-8-index-write-api-status-403/21082/6 "2015-12-17T08:09:38Z")

</div>

The reason for this in my case was that the ES machine ran out of space. I had to increase disk space. Hope that helps.

---

<div class="post-metadata">

**Author:** ![Khalid\_Al\_Mahmud](https://avatars.discourse-cdn.com/v4/letter/k/73ab20/32.png) [@Khalid\_Al\_Mahmud](https://discuss.elastic.co/u/Khalid_Al_Mahmud)\
**Post date:** [March 10, 2017, 12:49am UTC](https://discuss.elastic.co/t/delete-by-query-api-clusterblockexception-blocked-by-forbidden-8-index-write-api-status-403/21082/7 "2017-03-10T00:49:00Z")

</div>

Yap, Check your free space

---

<div class="post-metadata">

**Author:** ![deerawan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deerawan/32/14676_2.png) [@deerawan](https://discuss.elastic.co/u/deerawan)\
**Post date:** [April 26, 2017, 4:19am UTC](https://discuss.elastic.co/t/delete-by-query-api-clusterblockexception-blocked-by-forbidden-8-index-write-api-status-403/21082/8 "2017-04-26T04:19:04Z")

</div>

I also got same issue but my disk still have a lot free storage space.

wondering why it can happen.

---

<div class="post-metadata">

**Author:** ![mukesh2802](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@mukesh2802](https://discuss.elastic.co/u/mukesh2802)\
**Post date:** [April 28, 2017, 3:48am UTC](https://discuss.elastic.co/t/delete-by-query-api-clusterblockexception-blocked-by-forbidden-8-index-write-api-status-403/21082/9 "2017-04-28T03:48:42Z")

</div>

Having the same issue , could someone help to find the root cause ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:00pm UTC](https://discuss.elastic.co/t/delete-by-query-api-clusterblockexception-blocked-by-forbidden-8-index-write-api-status-403/21082/10 "2017-07-05T22:00:51Z")

</div>


