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


(Rajib Halder) #1

Hi,

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

My application is very simple, it just creates document in elastic search 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 elastic search 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 elastic search ?

Regards,
Rajib


(Christian Dahlqvist) #2

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.


(Rajib Halder) #3

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

Rajib


(Christian Dahlqvist) #4

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.


(Rajib Halder) #5

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


(David Pilato) #6

In dev, I'm setting:

cluster.routing.allocation.disk.threshold_enabled: false

(Rajib Halder) #7

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


(system) #8

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