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

(Sagar Arora) #1

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

(David Pilato) #2

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.

(Sagar Arora) #3

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

(David Pilato) #4

What are the logs?

(Sagar Arora) #5

org.elasticsearch.bootstrap.StartupException: BindTransportException[Failed to bind to [9300]]; nested: BindException[Address already in use: bind];
at org.elasticsearch.bootstrap.Elasticsearch.init( ~[elasticsearch-5.5.1.jar:5.5.1]
at org.elasticsearch.bootstrap.Elasticsearch.execute( ~[elasticsearch-5.5.1.jar:5.5.1]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute( ~[elasticsearch-5.5.1.jar:5.5.1]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling( ~[elasticsearch-5.5.1.jar:5.5.1]
at org.elasticsearch.cli.Command.main( ~[elasticsearch-5.5.1.jar:5.5.1]
at org.elasticsearch.bootstrap.Elasticsearch.main( ~[elasticsearch-5.5.1.jar:5.5.1]
at org.elasticsearch.bootstrap.Elasticsearch.main( ~[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( ~[elasticsearch-5.5.1.jar:5.5.1]
at org.elasticsearch.transport.TcpTransport.bindServer( ~[elasticsearch-5.5.1.jar:5.5.1]
at org.elasticsearch.transport.netty4.Netty4Transport.doStart( ~[?:?]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start( ~[elasticsearch-5.5.1.jar:5.5.1]
at org.elasticsearch.transport.TransportService.doStart( ~[elasticsearch-5.5.1.jar:5.5.1]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start( ~[elasticsearch-5.5.1.jar:5.5.1]
at org.elasticsearch.node.Node.start( ~[elasticsearch-5.5.1.jar:5.5.1]
at org.elasticsearch.bootstrap.Bootstrap.start( ~[elasticsearch-5.5.1.jar:5.5.1]
at org.elasticsearch.bootstrap.Bootstrap.init( ~[elasticsearch-5.5.1.jar:5.5.1]
at org.elasticsearch.bootstrap.Elasticsearch.init( ~[elasticsearch-5.5.1.jar:5.5.1]
... 6 more
Caused by: Address already in use: bind
at Method) ~[?:?]
at ~[?:?]
at ~[?:?]
at ~[?:?]
at ~[?:?]
at$AbstractUnsafe.bind( ~[?:?]
at$HeadContext.bind( ~[?:?]
at ~[?:?]
at ~[?:?]
at ~[?:?]
at ~[?:?]
at io.netty.bootstrap.AbstractBootstrap$ ~[?:?]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute( ~[?:?]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks( ~[?:?]
at ~[?:?]

(David Pilato) #6

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:


You already have a node running on 9300

(Sagar Arora) #7

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

(Sagar Arora) #8

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

(David Pilato) #9

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

(Sagar Arora) #10

i am using elastic search 5.5.1

(Kran) #11

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.

(David Pilato) #12

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.

(Kran) #13

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


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.

(system) closed #15

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