Setting number_of_replicas value to 0 makes the cluster unavailable


(vamshi) #1

I've installed elasticsearch 5.4 and kibana 5.4 on a single node cluster. after creating index, my shard status went to yellow. So, I thought to edit the number_of_replicas value in elasticsearch.yml to "0". Then I am getting following error:

    [2018-11-01T17:01:10,966][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [es-node01] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown setting [number_of_replicas] please check that any required plugins are installed, or check the breaking changes documentation for removed settings

(Mark Walkom) #2

You need to do that via the API, it is no longer a setting in the config file.


(vamshi) #3

Can you please provide me with the required API call?


(Mark Walkom) #4

curl -H "Content-Type: application/json" -XPUT localhost:9200/*/_settings -d '{ "index" : { "number_of_replicas" : 0 } }'

You can also update your templates to use no replicas.


(system) #5

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