Changing elasticsearch 6 index to read after only a few seconds

I want to use elasticsearch 6 on mac os, but when I create an index by adding a document so that none of them is an index after changing the index of a second to go into read-only mode and if you add a document or update document, report 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 am testing to disable read only

curl -H'Content-Type: application/json' -XPUT localhost:9200/test/_settings?pretty -d'
{
    "index": {
        "blocks.read_only": false
    }
}'
{
  "acknowledged" : true
}

but nothing will change

I am testing resistant 6 on another system with ubuntu os it ok and there is no error, so I think something is wrong with my system, but elasticsearch 5.6.2 works correctly without errors

elastic log

[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
+6
source share
3 answers

, , 6 , 5%, asticsearch.yml

 cluster.routing.allocation.disk.threshold_enabled: false

. ,

+17

/ Kibana

# 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
}
+3

If you're working with elastic search in Docker, there may not be enough space in Docker. Either run docker volumeto delete unused local volumes, or increase the size of the disk image in the Docker settings.

0
source

Source: https://habr.com/ru/post/1691798/


All Articles