# Passing gateway.expected\_nodes as a command line parameter?

**URL:** <https://discuss.elastic.co/t/passing-gateway-expected-nodes-as-a-command-line-parameter/24918>\
**Category:** Elasticsearch\
**Created:** [July 5, 2015, 11:28pm UTC](https://discuss.elastic.co/t/passing-gateway-expected-nodes-as-a-command-line-parameter/24918 "2015-07-05T23:28:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sacheendra\_Talluri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sacheendra_talluri/32/780_2.png) [@Sacheendra\_Talluri](https://discuss.elastic.co/u/Sacheendra_Talluri)\
**Post date:** [July 5, 2015, 11:28pm UTC](https://discuss.elastic.co/t/passing-gateway-expected-nodes-as-a-command-line-parameter/24918/1 "2015-07-05T23:28:16Z")

</div>

Would passing expected nodes to elasticsearch as a command line parameter like this work?

"elasticsearch -Des.gateway.expected\_nodes=2"

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [July 6, 2015, 4:26am UTC](https://discuss.elastic.co/t/passing-gateway-expected-nodes-as-a-command-line-parameter/24918/2 "2015-07-06T04:26:26Z")

</div>

You should be able to pass expected nodes to elasticsearch as a commandline parameter like so:

```
elasticsearch --gateway.expected_nodes=2

```

Reference: [https://www.elastic.co/guide/en/elasticsearch/reference/current/\_system\_and\_settings.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/_system_and_settings.html)

---

<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:** [July 6, 2015, 5:45am UTC](https://discuss.elastic.co/t/passing-gateway-expected-nodes-as-a-command-line-parameter/24918/3 "2015-07-06T05:45:22Z")

</div>

Using `-Des.gateway.expected_nodes=2` should work 🙂

---

<div class="post-metadata">

**Author:** ![Sacheendra\_Talluri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sacheendra_talluri/32/780_2.png) [@Sacheendra\_Talluri](https://discuss.elastic.co/u/Sacheendra_Talluri)\
**Post date:** [July 6, 2015, 5:57pm UTC](https://discuss.elastic.co/t/passing-gateway-expected-nodes-as-a-command-line-parameter/24918/4 "2015-07-06T17:57:08Z")

</div>

I doubted whether this would work because when i tried the option -Des.bootstrap.mlockall=true it did not work, any idea why this did not work?

---

<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:** [July 6, 2017, 12:03am UTC](https://discuss.elastic.co/t/passing-gateway-expected-nodes-as-a-command-line-parameter/24918/5 "2017-07-06T00:03:23Z")

</div>


