# How to add multiple nodes in same cluster using elasticsearch.yml file

**URL:** <https://discuss.elastic.co/t/how-to-add-multiple-nodes-in-same-cluster-using-elasticsearch-yml-file/94852>\
**Category:** Elasticsearch\
**Created:** [July 27, 2017, 6:53pm UTC](https://discuss.elastic.co/t/how-to-add-multiple-nodes-in-same-cluster-using-elasticsearch-yml-file/94852 "2017-07-27T18:53:58Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![sagar](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sagar](https://discuss.elastic.co/u/sagar)\
**Post date:** [July 27, 2017, 6:53pm UTC](https://discuss.elastic.co/t/how-to-add-multiple-nodes-in-same-cluster-using-elasticsearch-yml-file/94852/1 "2017-07-27T18:53:59Z")

</div>

I am new to elastic search and i want to know how can i setup multiple nodes cluster using the configuration file.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 27, 2017, 7:07pm UTC](https://discuss.elastic.co/t/how-to-add-multiple-nodes-in-same-cluster-using-elasticsearch-yml-file/94852/2 "2017-07-27T19:07:44Z")

</div>

I'm not sure about your question but basically just start new nodes as you started the first one.

If something is wrong then share your logs and settings.

---

<div class="post-metadata">

**Author:** ![sagar](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sagar](https://discuss.elastic.co/u/sagar)\
**Post date:** [July 27, 2017, 7:09pm UTC](https://discuss.elastic.co/t/how-to-add-multiple-nodes-in-same-cluster-using-elasticsearch-yml-file/94852/3 "2017-07-27T19:09:33Z")

</div>

can you give me a example of the yml file in which you have added two nodes under the same cluster i am not able to do that

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 27, 2017, 7:36pm UTC](https://discuss.elastic.co/t/how-to-add-multiple-nodes-in-same-cluster-using-elasticsearch-yml-file/94852/4 "2017-07-27T19:36:47Z")

</div>

What are the logs?

---

<div class="post-metadata">

**Author:** ![sagar](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sagar](https://discuss.elastic.co/u/sagar)\
**Post date:** [July 27, 2017, 7:44pm UTC](https://discuss.elastic.co/t/how-to-add-multiple-nodes-in-same-cluster-using-elasticsearch-yml-file/94852/5 "2017-07-27T19:44:51Z")

</div>

org.elasticsearch.bootstrap.StartupException: BindTransportException[Failed to bind to [9300]]; nested: BindException[Address already in use: bind];  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:127) ~[elasticsearch-5.5.1.jar:5.5.1]  
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) ~[elasticsearch-5.5.1.jar:5.5.1]  
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) ~[elasticsearch-5.5.1.jar:5.5.1]  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.5.1.jar:5.5.1]  
at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.5.1.jar:5.5.1]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.5.1.jar:5.5.1]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.5.1.jar:5.5.1]  
Caused by: org.elasticsearch.transport.BindTransportException: Failed to bind to [9300]  
at org.elasticsearch.transport.TcpTransport.bindToPort(TcpTransport.java:793) ~[elasticsearch-5.5.1.jar:5.5.1]  
at org.elasticsearch.transport.TcpTransport.bindServer(TcpTransport.java:758) ~[elasticsearch-5.5.1.jar:5.5.1]  
at org.elasticsearch.transport.netty4.Netty4Transport.doStart(Netty4Transport.java:173) ~[?:?]  
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:69) ~[elasticsearch-5.5.1.jar:5.5.1]  
at org.elasticsearch.transport.TransportService.doStart(TransportService.java:209) ~[elasticsearch-5.5.1.jar:5.5.1]  
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:69) ~[elasticsearch-5.5.1.jar:5.5.1]  
at org.elasticsearch.node.Node.start(Node.java:692) ~[elasticsearch-5.5.1.jar:5.5.1]  
at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:277) ~[elasticsearch-5.5.1.jar:5.5.1]  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:360) ~[elasticsearch-5.5.1.jar:5.5.1]  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.5.1.jar:5.5.1]  
... 6 more  
Caused by: java.net.BindException: Address already in use: bind  
at sun.nio.ch.Net.bind0(Native Method) ~[?:?]  
at sun.nio.ch.Net.bind(Net.java:433) ~[?:?]  
at sun.nio.ch.Net.bind(Net.java:425) ~[?:?]  
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[?:?]  
at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:128) ~[?:?]  
at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:554) ~[?:?]  
at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1258) ~[?:?]  
at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:501) ~[?:?]  
at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:486) ~[?:?]  
at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:980) ~[?:?]  
at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:250) ~[?:?]  
at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:365) ~[?:?]  
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[?:?]  
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403) ~[?:?]  
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462) ~[?:?]

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 27, 2017, 8:32pm UTC](https://discuss.elastic.co/t/how-to-add-multiple-nodes-in-same-cluster-using-elasticsearch-yml-file/94852/6 "2017-07-27T20:32:40Z")

</div>

Please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

You already have a node running on 9300

---

<div class="post-metadata">

**Author:** ![sagar](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sagar](https://discuss.elastic.co/u/sagar)\
**Post date:** [July 27, 2017, 8:34pm UTC](https://discuss.elastic.co/t/how-to-add-multiple-nodes-in-same-cluster-using-elasticsearch-yml-file/94852/7 "2017-07-27T20:34:09Z")

</div>

okay so i cant run on the same tcp port even if i have the same cluster

---

<div class="post-metadata">

**Author:** ![sagar](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sagar](https://discuss.elastic.co/u/sagar)\
**Post date:** [July 27, 2017, 8:37pm UTC](https://discuss.elastic.co/t/how-to-add-multiple-nodes-in-same-cluster-using-elasticsearch-yml-file/94852/8 "2017-07-27T20:37:47Z")

</div>

if i want my ip to be same how should i do that

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 27, 2017, 9:00pm UTC](https://discuss.elastic.co/t/how-to-add-multiple-nodes-in-same-cluster-using-elasticsearch-yml-file/94852/9 "2017-07-27T21:00:31Z")

</div>

For tests only, just keep all defaults and run bin/elasticsearch again

---

<div class="post-metadata">

**Author:** ![sagar](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sagar](https://discuss.elastic.co/u/sagar)\
**Post date:** [July 27, 2017, 9:11pm UTC](https://discuss.elastic.co/t/how-to-add-multiple-nodes-in-same-cluster-using-elasticsearch-yml-file/94852/10 "2017-07-27T21:11:56Z")

</div>

i am using elastic search 5.5.1

---

<div class="post-metadata">

**Author:** ![Kranthi\_Dharani](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@Kranthi\_Dharani](https://discuss.elastic.co/u/Kranthi_Dharani)\
**Post date:** [July 27, 2017, 10:16pm UTC](https://discuss.elastic.co/t/how-to-add-multiple-nodes-in-same-cluster-using-elasticsearch-yml-file/94852/11 "2017-07-27T22:16:23Z")

</div>

Is there a way I can increase elasticsearch nodes using AWS CLI or using the ElasticSearch Rest endpoint ?. I have 2 master nodes and 4 client/data nodes. I want to increase the master nodes to 3 and client/data nodes to 5. Appreciate your reply for any references.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 28, 2017, 1:44am UTC](https://discuss.elastic.co/t/how-to-add-multiple-nodes-in-same-cluster-using-elasticsearch-yml-file/94852/12 "2017-07-28T01:44:07Z")

</div>

Please open your own thread.

Answer is no. I don't know how AWS CLI is concerned BTW. Elastic Cloud Enterprise is probably able to increase the size of the cluster by calling the REST API though.

---

<div class="post-metadata">

**Author:** ![Kranthi\_Dharani](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@Kranthi\_Dharani](https://discuss.elastic.co/u/Kranthi_Dharani)\
**Post date:** [July 28, 2017, 2:13am UTC](https://discuss.elastic.co/t/how-to-add-multiple-nodes-in-same-cluster-using-elasticsearch-yml-file/94852/13 "2017-07-28T02:13:05Z")

</div>

Sure thanks David for your reply. I will open a new thread

---

<div class="post-metadata">

**Author:** ![jth1](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@jth1](https://discuss.elastic.co/u/jth1)\
**Post date:** [July 28, 2017, 2:32am UTC](https://discuss.elastic.co/t/how-to-add-multiple-nodes-in-same-cluster-using-elasticsearch-yml-file/94852/14 "2017-07-28T02:32:07Z")

</div>

A node is nothing but a new instance of elasticsearch. if you start two instances with same cluster name then it will be a cluster of two nodes. You might have started one instance by unzipping if windows in to a folder and started elasticsearch from bin. Repeat the same. By default the cluster name is 'elasticsearch'. After starting the second instance, if you check the health status of cluster, you can see the number of nodes as 2.

---

<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:** [August 25, 2017, 2:32am UTC](https://discuss.elastic.co/t/how-to-add-multiple-nodes-in-same-cluster-using-elasticsearch-yml-file/94852/15 "2017-08-25T02:32:18Z")

</div>

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