# Elastic node can't start due to removed index setting

**URL:** <https://discuss.elastic.co/t/elastic-node-cant-start-due-to-removed-index-setting/290115>\
**Category:** Elasticsearch\
**Created:** [November 25, 2021, 2:10am UTC](https://discuss.elastic.co/t/elastic-node-cant-start-due-to-removed-index-setting/290115 "2021-11-25T02:10:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vvp199303](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vvp199303/32/97459_2.png) [@vvp199303](https://discuss.elastic.co/u/vvp199303)\
**Post date:** [November 25, 2021, 2:10am UTC](https://discuss.elastic.co/t/elastic-node-cant-start-due-to-removed-index-setting/290115/1 "2021-11-25T02:10:28Z")

</div>

Hi. I have a trouble with Elastic cluster (v 7.13.0) . Аfter adding an _{ "index.mapper.dynamic" : false }_ option for one index in cluster I was unable to restart cluster node.  
Also, I can't change _"index.mapper.dynamic"_ option to _true_ or _null_ - I get similar error:

```auto
curl -X PUT "http://localhost:9200/core_ws_folders_documents/_settings?pretty" -H 'Content-Type: application/json' -d' { "index.mapper.dynamic" : true} '{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "Setting index.mapper.dynamic was removed after version 6.0.0"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "Setting index.mapper.dynamic was removed after version 6.0.0"
  },
  "status" : 400
}

```

More information about the problem in attached file.

I don't quite understand how you can get around this problem. Any help would be appreciated. Thanks.

 ![elastic_ws_problem_1](https://us1.discourse-cdn.com/elastic/original/3X/9/6/96f131fbe7e50270305f2dd8d1a864ce71509940.png)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 25, 2021, 4:26am UTC](https://discuss.elastic.co/t/elastic-node-cant-start-due-to-removed-index-setting/290115/2 "2021-11-25T04:26:58Z")

</div>

Welcome to our community! 😃

Please don't post pictures of text, logs or code. They are difficult to read, impossible to search and replicate (if it's code), and some people may not be even able to see them 🙂

---

<div class="post-metadata">

**Author:** ![DineshNaik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dineshnaik/32/89308_2.png) [@DineshNaik](https://discuss.elastic.co/u/DineshNaik)\
**Post date:** [November 25, 2021, 1:34pm UTC](https://discuss.elastic.co/t/elastic-node-cant-start-due-to-removed-index-setting/290115/3 "2021-11-25T13:34:44Z")

</div>

As you see in logs as well as api output : **Setting index.mapper.dynamic was removed after version 6.0.0**

Ideally, it should not impact the es process per say. Are you saying es process/jvm is not running once you ran the api to change it?

i guess only the index for which you tried to change the setting might be in red status and probably you need to recreate the index and repopulate the data. See if you can delete the index which is in red status if that's an option for you?

Also avoid changing index.mapper.dynamic going forward as its not recommended!

---

<div class="post-metadata">

**Author:** ![vvp199303](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vvp199303/32/97459_2.png) [@vvp199303](https://discuss.elastic.co/u/vvp199303)\
**Post date:** [November 26, 2021, 12:02am UTC](https://discuss.elastic.co/t/elastic-node-cant-start-due-to-removed-index-setting/290115/4 "2021-11-26T00:02:32Z")

</div>

> [@DineshNaik](#):
>
> Ideally, it should not impact the es process per say. Are you saying es process/jvm is not running once you ran the api to change it?

Yes, a problem appeared after I changed setting to _false_. Index is still yellow due to replica shards.  
If there is no another solution I will try to recreate index, but that's not a good option for me.  
Index size is more than 4 TB, reindexing will take a long time.  
Also, this is current index settings:

```auto
admin@elastic2:~$ curl -s -X GET "http://localhost:9200/core_ws_folders_documents/_settings?pretty"
{
  "core_ws_folders_documents" : {
    "settings" : {
      "index" : {
        "routing" : {
          "allocation" : {
            "include" : {
              "_tier_preference" : "data_content"
            }
          }
        },
        "mapping" : {
          "total_fields" : {
            "limit" : "50000"
          }
        },
        "number_of_shards" : "8",
        "provided_name" : "core_ws_folders_documents",
        "mapper" : {
          "dynamic" : "false"
        },
        "creation_date" : "1625641062374",
        "number_of_replicas" : "1",
        "uuid" : "WnQR8vlxT_iu4XsCY99cuw",
        "version" : {
          "created" : "7130099"
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![DineshNaik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dineshnaik/32/89308_2.png) [@DineshNaik](https://discuss.elastic.co/u/DineshNaik)\
**Post date:** [November 26, 2021, 3:47am UTC](https://discuss.elastic.co/t/elastic-node-cant-start-due-to-removed-index-setting/290115/5 "2021-11-26T03:47:22Z")

</div>

Ok , I think it's a bug . In ideal scenario we should not be able to modify it at the first place as that caused the damage and index went in yellow/red status.

By the way, once you run the api, did you restart es process and saw the indices in yellow status or without restart ?

---

<div class="post-metadata">

**Author:** ![DineshNaik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dineshnaik/32/89308_2.png) [@DineshNaik](https://discuss.elastic.co/u/DineshNaik)\
**Post date:** [November 26, 2021, 6:50pm UTC](https://discuss.elastic.co/t/elastic-node-cant-start-due-to-removed-index-setting/290115/6 "2021-11-26T18:50:10Z")

</div>

@vvp199303 I am not sure how to fix this on the existing index, but I would suggest you to either take a backup of your index or make the cluster status green as soon as possible before you restart your cluster(all nodes).

In fact, i would recommend not to restart the nodes unless you are done fixing this issue, restarting nodes will make the index go in red status and you will loose the data.

Here is one way to fix it :

1. create a new index with just primary shard/shards (no replica, by making replca 1) . say _core\_ws\_folders\_documents\_new_

2. reindex data to this new index _core\_ws\_folders\_documents\_new_ using [reindex](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html) api  
you can use command

```auto
POST _reindex?wait_for_completion=false
{
  "source": {
    "index": "core_ws_folders_documents"
  },
  "dest": {
    "index": "core_ws_folders_documents_new"
  }
}

```

the above command will give you a task id through which you can check the status of reindex api:

`GET _tasks/TASK_ID`

1. once reindexing is done you can increase the number of replica for the newly created index.

2. Delete the index _core\_ws\_folders\_documents_

`DELETE core_ws_folders_documents`

1. create an alias for index _core\_ws\_folders\_documents\_new_ as **core\_ws\_folders\_documents**

```auto
POST _aliases
{
  "actions": [
    {
      "add": {
        "index": "core_ws_folders_documents_new",
        "alias": "core_ws_folders_documents"
      }
    }
  ]
}

```

Note: Please do try these in a lower environment first before you actually run them in your actual cluster.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 24, 2021, 6:50pm UTC](https://discuss.elastic.co/t/elastic-node-cant-start-due-to-removed-index-setting/290115/7 "2021-12-24T18:50:56Z")

</div>

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