How to cancel the installation of the Elasticsearch index for reading?

So I just set one of my read-only indexes, and now I want to remove it.

To install it read-only:

PUT my_index/_settings
{ "index": { "index.blocks.read_only" : true } }

When I tried to remove it, I got this answer:

ClusterBlockException[blocked by: [FORBIDDEN/5/index read-only (api)];]

Then I tried to set the index as readonly false:

PUT my_index/_settings
{ "index": { "index.blocks.read_only" : false } }

But this gives the same error message as above. So how to set readonly back to false?

+23
source share
5 answers

The right way to do es indexread-only

PUT your_index/_settings
{
  "index": {
    "blocks.read_only": true
  }
}

change trueto falseto cancel it.

You set a non-dynamic setting with

   {
      "index": {
        "index.blocks.read_only": false
      }
    }

, , . , , close indices.

POST your_index/_close

.

+24

, 6:

PUT /[_all|<index-name>]/_settings
{
  "index.blocks.read_only_allow_delete": null
}

https://www.elastic.co/guide/en/elasticsearch/reference/6.x/disk-allocator.html

( ): - logstash:

...retrying failed action with response code: 403 ({"type"=>"cluster_block_exception", "reason"=>"blocked"

elasticsearch:
ClusterBlockException[blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];]

+30

2.x ElasticSearch (ES)

PUT your_index/_settings

{
  "index": {
    "blocks": {
      "write": "false",
      "read_only": "false"
    }
  }
}

read_only true ES write true, read_only false , write .

+3

Kibana, URL- kibana:

Management (Left pane) -> Elasticseach Index Management -> Select your Index -> Edit Settings

:

"index.blocks.read_only_allow_delete": "false"

, kibana, dev tools ( ) :

PUT _settings
{
  "index": {
    "blocks": {
      "read_only_allow_delete": "false"
    }
  }
}
+1
curl -X PUT "localhost:9200/_all/_settings" -H 'Content-Type: application/json' -d'{ "index.blocks.read_only" : false } }'
0

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


All Articles