Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have problem with Elasticsearch. I tried the following:

 $ curl -XPUT -H "Content-Type: application/json" 
     http://localhost:9200/_all/_settings 
       -d '{"index.blocks.read_only_allow_delete": false}'

My settings:

"settings": {
  "index": {
    "number_of_shards": "5",
    "blocks": {
      "read_only_allow_delete": "true"
    },
    "provided_name": "new-index",
    "creation_date": "1515433832692",
    "analysis": {
      "filter": {
        "ngram_filter": {
          "type": "ngram",
          "min_gram": "2",
          "max_gram": "4"
        }
      },
      "analyzer": {
        "ngram_analyzer": {
          "filter": [
            "ngram_filter"
          ],
          "type": "custom",
          "tokenizer": "standard"
        }
      }
    },
    "number_of_replicas": "1",
    "uuid": "OSG7CNAWR9-G3QC75K4oQQ",
    "version": {
      "created": "6010199"
    }
  }
}

When I check settings it looks fine, but only a few seconds (3-5) and it's still set to true. I can't add new elements and query anything, only _search and delete.

Someone have any idea how to resolve this?

NOTE: I'm using Elasticsearch version: 6.1.1

question from:https://stackoverflow.com/questions/48155774/elasticsearch-read-only-allow-delete-auto-setting

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
83 views
Welcome To Ask or Share your Answers For Others

1 Answer

Elasticsearch automatically sets "read_only_allow_delete": "true" when hard disk space is low.

Find the files which are filling up your storage and delete/move them. Once you have sufficient storage available run the following command through the Dev Tool in Kibana:

PUT your_index_name/_settings
{
 "index": {
   "blocks": {
     "read_only_allow_delete": "false"
    }
  }
}

OR (through the terminal):

$ curl -XPUT -H "Content-Type: application/json" 
   http://localhost:9200/_all/_settings 
     -d '{"index.blocks.read_only_allow_delete": false}'

as mentioned in your question.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...