# Setting number\_of\_replicas value to 0 makes the cluster unavailable

**URL:** https://discuss.elastic.co/t/setting-number-of-replicas-value-to-0-makes-the-cluster-unavailable/155083
**Category:** Elasticsearch
**Created:** [November 1, 2018, 9:17pm UTC](https://discuss.elastic.co/t/setting-number-of-replicas-value-to-0-makes-the-cluster-unavailable/155083 "2018-11-01T21:17:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![vnallamothu](https://avatars.discourse-cdn.com/v4/letter/v/35a633/32.png) [@vnallamothu](https://discuss.elastic.co/u/vnallamothu)
#### Post date: [November 1, 2018, 9:17pm UTC](https://discuss.elastic.co/t/setting-number-of-replicas-value-to-0-makes-the-cluster-unavailable/155083/1 "2018-11-01T21:17:14Z")

</div>

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
```

---

<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 1, 2018, 9:17pm UTC](https://discuss.elastic.co/t/setting-number-of-replicas-value-to-0-makes-the-cluster-unavailable/155083/2 "2018-11-01T21:17:58Z")

</div>

> [@vnallamothu](#):
>
> unknown setting [number\_of\_replicas]

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

---

<div class="post-metadata">

### Author: ![vnallamothu](https://avatars.discourse-cdn.com/v4/letter/v/35a633/32.png) [@vnallamothu](https://discuss.elastic.co/u/vnallamothu)
#### Post date: [November 1, 2018, 9:22pm UTC](https://discuss.elastic.co/t/setting-number-of-replicas-value-to-0-makes-the-cluster-unavailable/155083/3 "2018-11-01T21:22:13Z")

</div>

> [@warkolm](#):
>
> number\_of\_replicas]

Can you please provide me with the required API call?

---

<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 1, 2018, 9:29pm UTC](https://discuss.elastic.co/t/setting-number-of-replicas-value-to-0-makes-the-cluster-unavailable/155083/4 "2018-11-01T21:29:05Z")

</div>

`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.

---

<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: [November 29, 2018, 9:29pm UTC](https://discuss.elastic.co/t/setting-number-of-replicas-value-to-0-makes-the-cluster-unavailable/155083/5 "2018-11-29T21:29:09Z")

</div>

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