I want to use elasticsearch 6 on mac os but when I create an index by adding a document to none exist index after few second index change to read-only and if add document or update document give this error
"error" : {
"root_cause" : [
{
"type" : "cluster_block_exception",
"reason" : "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"
}
],
"type" : "cluster_block_exception",
"reason" : "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"
},
"status" : 403
}
I test to disable read only by
curl -H'Content-Type: application/json' -XPUT localhost:9200/test/_settings?pretty -d'
{
"index": {
"blocks.read_only": false
}
}'
{
"acknowledged" : true
}
but nothing change
I test elastic 6 on another system with ubuntu os it's ok and there is no error then I think maybe something wrong with my system but elasticsearch 5.6.2 works correctly without any error
the elastic log is
[2018-01-05T21:56:52,254][WARN ][o.e.c.r.a.DiskThresholdMonitor] [gCjouly] flood stage disk watermark [95%] exceeded on [gCjoulysTFy1DDU7f7dOWQ][gCjouly][/Users/peter/Downloads/elasticsearch-6.1.1/data/nodes/0] free: 15.7gb[3.3%], all indices on this node will marked read-only
I had this problem I think in elastic 6 add new setting to close index when empty hard less than 5% you can disable this by below line in elasticsearch.yml
cluster.routing.allocation.disk.threshold_enabled: false
Then restart elasticsearch. I hope this work for you
Convenience for copy/pasting into Kibana console
# disable threshold alert
PUT /_cluster/settings
{
"persistent" : {
"cluster.routing.allocation.disk.threshold_enabled" : false
}
}
# unlock indices from read-only state
PUT /_all/_settings
{
"index.blocks.read_only_allow_delete": null
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With