# org.elasticsearch.cluster.block.ClusterBlockException: blocked by: \[FORBIDDEN/12/index read-only / allow delete (api)\]

**URL:** <https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-forbidden-12-index-read-only-allow-delete-api/130963>\
**Category:** Elasticsearch\
**Created:** [May 8, 2018, 9:29am UTC](https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-forbidden-12-index-read-only-allow-delete-api/130963 "2018-05-08T09:29:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajibsoft](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajibsoft/32/30857_2.png) [@rajibsoft](https://discuss.elastic.co/u/rajibsoft)\
**Post date:** [May 8, 2018, 9:29am UTC](https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-forbidden-12-index-read-only-allow-delete-api/130963/1 "2018-05-08T09:29:21Z")

</div>

Hi,

I am new to Elasticsearch. I am developing an application based on Spring boot (Version 2.0.1.RELEASE) and Elasticsearch (Version 6.2.4)

My application is very simple, it just creates document in Elasticsearch index by REST call. But i am getting below error:

> org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [FORBIDDEN/12/index read-only / allow delete (api)]

I understood the reason behind it as Elasticsearch is clearly saying:

> [2018-05-08T14:55:02,341][WARN][o.e.c.r.a.DiskThresholdMonitor] [j4dhI17] flood stage disk watermark [95%] exceeded on j4dhI178TbWg0VVY\_zbx0w][j4dhI17][D:\Drive\_E\SOFTWARES\elasticsearch-6.2.4\data\nodes\0] free: 10.4gb[3.2%], all indices on this node will marked read-only

My question is Has there any way so that i can avoid this restriction (High disk usage watermark) configuring Elasticsearch ?

Regards,  
Rajib

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 8, 2018, 9:33am UTC](https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-forbidden-12-index-read-only-allow-delete-api/130963/2 "2018-05-08T09:33:49Z")

</div>

Running out of disk space can have severe consequences (data loss, corrupted indices etc), so while you can tune these watermarks, you do not want to disable them.

---

<div class="post-metadata">

**Author:** ![rajibsoft](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajibsoft/32/30857_2.png) [@rajibsoft](https://discuss.elastic.co/u/rajibsoft)\
**Post date:** [May 8, 2018, 9:37am UTC](https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-forbidden-12-index-read-only-allow-delete-api/130963/3 "2018-05-08T09:37:26Z")

</div>

Thanks @Christian_Dahlqvist for the explanation. Where can we define the high water mark in elastic search configuration ? Is it fixed or configurable ?

Rajib

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 8, 2018, 9:47am UTC](https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-forbidden-12-index-read-only-allow-delete-api/130963/4 "2018-05-08T09:47:59Z")

</div>

You can [configure it](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/disk-allocator.html), but make sure you are not too aggressive as disk usage grows and shrinks as data is merges when you are indexing into Elasticsearch. You also need free disk space if you want to force merge older indices. If completely fill up your disk you will be in trouble.

---

<div class="post-metadata">

**Author:** ![rajibsoft](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajibsoft/32/30857_2.png) [@rajibsoft](https://discuss.elastic.co/u/rajibsoft)\
**Post date:** [May 8, 2018, 9:56am UTC](https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-forbidden-12-index-read-only-allow-delete-api/130963/5 "2018-05-08T09:56:21Z")

</div>

Thanks, i got my answer. Yes, i understood the risk of modifying water mark as it may have fatal impact on data stored on elastic search.

Regards,  
Rajib

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 8, 2018, 10:31am UTC](https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-forbidden-12-index-read-only-allow-delete-api/130963/6 "2018-05-08T10:31:11Z")

</div>

In dev, I'm setting:

```
cluster.routing.allocation.disk.threshold_enabled: false
```

---

<div class="post-metadata">

**Author:** ![rajibsoft](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajibsoft/32/30857_2.png) [@rajibsoft](https://discuss.elastic.co/u/rajibsoft)\
**Post date:** [May 8, 2018, 10:38am UTC](https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-forbidden-12-index-read-only-allow-delete-api/130963/7 "2018-05-08T10:38:20Z")

</div>

Yes, i followed the same approach and the restriction has gone and elastic search working. As @Christian_Dahlqvist mentioned it is very risky and should be done only in research and development environment and not at any production environment.

Rajib

---

<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:** [June 5, 2018, 10:38am UTC](https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-forbidden-12-index-read-only-allow-delete-api/130963/8 "2018-06-05T10:38:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
