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

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

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.

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

Rajib

You can configure it, 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.

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

In dev, I'm setting:

cluster.routing.allocation.disk.threshold_enabled: false

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

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