# "no initial state was set by discovery" when running multiple instances of elasticsearch in same machine

**URL:** <https://discuss.elastic.co/t/no-initial-state-was-set-by-discovery-when-running-multiple-instances-of-elasticsearch-in-same-machine/16098>\
**Category:** Elasticsearch\
**Created:** [March 3, 2014, 7:07am UTC](https://discuss.elastic.co/t/no-initial-state-was-set-by-discovery-when-running-multiple-instances-of-elasticsearch-in-same-machine/16098 "2014-03-03T07:07:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![soumya\_sengupta](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@soumya\_sengupta](https://discuss.elastic.co/u/soumya_sengupta)\
**Post date:** [March 3, 2014, 7:07am UTC](https://discuss.elastic.co/t/no-initial-state-was-set-by-discovery-when-running-multiple-instances-of-elasticsearch-in-same-machine/16098/1 "2014-03-03T07:07:19Z")

</div>

I am trying to run 5 elasticsearch instances in a single machine each  
having its own port and elasticsearch.yml files

When I start NodeA, I get the following warning of _no initial state was  
set by discovery_  
] [NodeA] version[1.0.0], pid[11165], build[a46900e/2014-02-12T16:18:34Z]  
[2014-03-03 11:46:41,049][INFO][node] [NodeA]  
initializing ...  
[2014-03-03 11:46:41,054][INFO][plugins] [NodeA] loaded  
[], sites []  
[2014-03-03 11:46:44,133][INFO][node] [NodeA]  
initialized  
[2014-03-03 11:46:44,133][INFO][node] [NodeA]  
starting ...  
[2014-03-03 11:46:44,285][INFO][transport] [NodeA]  
bound\_address {inet[/0:0:0:0:0:0:0:0:9301]}, publish\_address  
{inet[/10.226.20.99:9301]}  
_[2014-03-03 11:47:14,298][WARN][discovery] [NodeA] waited  
for 30s and no initial state was set by the discovery_  
[2014-03-03 11:47:14,299][INFO][discovery] [NodeA]  
myCluster/BUpJ6SX2TCa8s\_2Z0Zoizw  
[2014-03-03 11:47:14,306][INFO][http] [NodeA]  
bound\_address {inet[/0:0:0:0:0:0:0:0:9201]}, publish\_address  
{inet[/10.226.20.99:9201]}  
[2014-03-03 11:47:14,312][INFO][node] [NodeA] started

I have made the following changes in the respective elasticsearch.yml file

_Instance 1_  
cluster.name: myCluster  
node.name: "NodeA"

_node.master: true_  
_node.data: true_  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2  
transport.tcp.port: 9301  
http.port: 9201  
discovery.zen.minimum\_master\_nodes: 3  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

_Instance 2_  
cluster.name: myCluster  
node.name: "NodeB"

_node.master: true_  
_node.data: true_  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2  
transport.tcp.port: 9302  
http.port: 9202  
discovery.zen.minimum\_master\_nodes: 3  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

_Instance 3_  
cluster.name: myCluster  
node.name: "NodeC"

_node.master: true_  
_node.data: true_  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2  
transport.tcp.port: 9303  
http.port: 9203  
discovery.zen.minimum\_master\_nodes: 3  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

_Instance 4_  
cluster.name: myCluster  
node.name: "NodeD"

_node.master: false_  
_node.data: true_  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2  
transport.tcp.port: 9304  
http.port: 9204  
discovery.zen.minimum\_master\_nodes: 3  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

_Instance 5 (load balancer)_  
cluster.name: myCluster  
node.name: "NodeE"

_node.master: false_  
_node.data: false_  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2  
transport.tcp.port: 9305  
http.port: 9205  
discovery.zen.minimum\_master\_nodes: 3  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e2749fb6-3d93-4d63-9ee8-60301e794e2b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e2749fb6-3d93-4d63-9ee8-60301e794e2b%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [March 3, 2014, 7:33am UTC](https://discuss.elastic.co/t/no-initial-state-was-set-by-discovery-when-running-multiple-instances-of-elasticsearch-in-same-machine/16098/2 "2014-03-03T07:33:04Z")

</div>

He can not find 2 other master nodes.  
Start two other master nodes and it should work.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 3 mars 2014 à 08:07, soumya sengupta [maverick.soumya@gmail.com](mailto:maverick.soumya@gmail.com) a écrit :

I am trying to run 5 elasticsearch instances in a single machine each having its own port and elasticsearch.yml files

When I start NodeA, I get the following warning of no initial state was set by discovery  
] [NodeA] version[1.0.0], pid[11165], build[a46900e/2014-02-12T16:18:34Z]  
[2014-03-03 11:46:41,049][INFO][node] [NodeA] initializing ...  
[2014-03-03 11:46:41,054][INFO][plugins] [NodeA] loaded [], sites []  
[2014-03-03 11:46:44,133][INFO][node] [NodeA] initialized  
[2014-03-03 11:46:44,133][INFO][node] [NodeA] starting ...  
[2014-03-03 11:46:44,285][INFO][transport] [NodeA] bound\_address {inet[/0:0:0:0:0:0:0:0:9301]}, publish\_address {inet[/10.226.20.99:9301]}  
[2014-03-03 11:47:14,298][WARN][discovery] [NodeA] waited for 30s and no initial state was set by the discovery  
[2014-03-03 11:47:14,299][INFO][discovery] [NodeA] myCluster/BUpJ6SX2TCa8s\_2Z0Zoizw  
[2014-03-03 11:47:14,306][INFO][http] [NodeA] bound\_address {inet[/0:0:0:0:0:0:0:0:9201]}, publish\_address {inet[/10.226.20.99:9201]}  
[2014-03-03 11:47:14,312][INFO][node] [NodeA] started

I have made the following changes in the respective elasticsearch.yml file

Instance 1  
cluster.name: myCluster  
node.name: "NodeA"  
node.master: true  
node.data: true  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2  
transport.tcp.port: 9301  
http.port: 9201  
discovery.zen.minimum\_master\_nodes: 3  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

Instance 2  
cluster.name: myCluster  
node.name: "NodeB"  
node.master: true  
node.data: true  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2  
transport.tcp.port: 9302  
http.port: 9202  
discovery.zen.minimum\_master\_nodes: 3  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

Instance 3  
cluster.name: myCluster  
node.name: "NodeC"  
node.master: true  
node.data: true  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2  
transport.tcp.port: 9303  
http.port: 9203  
discovery.zen.minimum\_master\_nodes: 3  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

Instance 4  
cluster.name: myCluster  
node.name: "NodeD"  
node.master: false  
node.data: true  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2  
transport.tcp.port: 9304  
http.port: 9204  
discovery.zen.minimum\_master\_nodes: 3  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

Instance 5 (load balancer)  
cluster.name: myCluster  
node.name: "NodeE"  
node.master: false  
node.data: false  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2  
transport.tcp.port: 9305  
http.port: 9205  
discovery.zen.minimum\_master\_nodes: 3  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e2749fb6-3d93-4d63-9ee8-60301e794e2b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e2749fb6-3d93-4d63-9ee8-60301e794e2b%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/D347E3DF-9636-4707-B78A-1359931A204C%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/D347E3DF-9636-4707-B78A-1359931A204C%40pilato.fr).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![soumya\_sengupta](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@soumya\_sengupta](https://discuss.elastic.co/u/soumya_sengupta)\
**Post date:** [March 3, 2014, 8:35am UTC](https://discuss.elastic.co/t/no-initial-state-was-set-by-discovery-when-running-multiple-instances-of-elasticsearch-in-same-machine/16098/3 "2014-03-03T08:35:15Z")

</div>

Started NodeA, NodeB, NodeC

_output for NodeA_  
[2014-03-03 13:14:52,759][INFO][node] [NodeA]  
version[1.0.0], pid[12562], build[a46900e/2014-02-12T16:18:34Z]  
[2014-03-03 13:14:52,760][INFO][node] [NodeA]  
initializing ...  
[2014-03-03 13:14:52,766][INFO][plugins] [NodeA] loaded  
, sites   
[2014-03-03 13:14:57,843][INFO][node] [NodeA]  
initialized  
[2014-03-03 13:14:57,843][INFO][node] [NodeA]  
starting ...  
[2014-03-03 13:14:58,142][INFO][transport] [NodeA]  
bound\_address {inet[/0:0:0:0:0:0:0:0:9301]}, publish\_address  
{inet[/10.226.20.99:9301]}  
[2014-03-03 13:15:28,230][WARN][discovery] [NodeA] waited  
for 30s and no initial state was set by the discovery  
[2014-03-03 13:15:28,263][INFO][discovery] [NodeA]  
myCluster/t1IdrsN\_QySxedCfnhx3eQ  
[2014-03-03 13:15:28,273][INFO][http] [NodeA]  
bound\_address {inet[/0:0:0:0:0:0:0:0:9201]}, publish\_address  
{inet[/10.226.20.99:9201]}  
[2014-03-03 13:15:28,631][INFO][node] [NodeA] started

_ouput for NodeB_  
[2014-03-03 13:16:34,744][INFO][node] [NodeB]  
version[1.0.0], pid[12738], build[a46900e/2014-02-12T16:18:34Z]  
[2014-03-03 13:16:34,745][INFO][node] [NodeB]  
initializing ...  
[2014-03-03 13:16:34,749][INFO][plugins] [NodeB] loaded  
, sites   
[2014-03-03 13:16:38,254][INFO][node] [NodeB]  
initialized  
[2014-03-03 13:16:38,254][INFO][node] [NodeB]  
starting ...  
[2014-03-03 13:16:38,387][INFO][transport] [NodeB]  
bound\_address {inet[/0:0:0:0:0:0:0:0:9302]}, publish\_address  
{inet[/10.226.20.99:9302]}  
[2014-03-03 13:17:08,400][WARN][discovery] [NodeB] waited  
for 30s and no initial state was set by the discovery  
[2014-03-03 13:17:08,401][INFO][discovery] [NodeB]  
myCluster/8U3tZocXRkaeSlY0BVnRJQ  
[2014-03-03 13:17:08,412][INFO][http] [NodeB]  
bound\_address {inet[/0:0:0:0:0:0:0:0:9202]}, publish\_address  
{inet[/10.226.20.99:9202]}  
[2014-03-03 13:17:08,460][INFO][node] [NodeB] started

_output for nodeC_  
[2014-03-03 13:17:28,330][INFO][node] [NodeC]  
version[1.0.0], pid[12834], build[a46900e/2014-02-12T16:18:34Z]  
[2014-03-03 13:17:28,346][INFO][node] [NodeC]  
initializing ...  
[2014-03-03 13:17:28,351][INFO][plugins] [NodeC] loaded  
, sites   
[2014-03-03 13:17:35,695][INFO][node] [NodeC]  
initialized  
[2014-03-03 13:17:35,695][INFO][node] [NodeC]  
starting ...  
[2014-03-03 13:17:36,129][INFO][transport] [NodeC]  
bound\_address {inet[/0:0:0:0:0:0:0:0:9303]}, publish\_address  
{inet[/10.226.20.99:9303]}  
[2014-03-03 13:18:06,294][WARN][discovery] [NodeC] waited  
for 30s and no initial state was set by the discovery  
[2014-03-03 13:18:06,294][INFO][discovery] [NodeC]  
myCluster/Di0ckyBtQuSuKts6lWkTdw  
[2014-03-03 13:18:06,340][INFO][http] [NodeC]  
bound\_address {inet[/0:0:0:0:0:0:0:0:9203]}, publish\_address  
{inet[/10.226.20.99:9203]}  
[2014-03-03 13:18:06,390][INFO][node] [NodeC] started

I think this is still not working...

On Monday, March 3, 2014 12:37:19 PM UTC+5:30, soumya sengupta wrote:

> I am trying to run 5 elasticsearch instances in a single machine each  
> having its own port and elasticsearch.yml files
> 
> When I start NodeA, I get the following warning of _no initial state was  
> set by discovery_  
> ] [NodeA] version[1.0.0], pid[11165], build[a46900e/2014-02-12T16:18:34Z]  
> [2014-03-03 11:46:41,049][INFO][node] [NodeA]  
> initializing ...  
> [2014-03-03 11:46:41,054][INFO][plugins] [NodeA] loaded  
> , sites   
> [2014-03-03 11:46:44,133][INFO][node] [NodeA]  
> initialized  
> [2014-03-03 11:46:44,133][INFO][node] [NodeA]  
> starting ...  
> [2014-03-03 11:46:44,285][INFO][transport] [NodeA]  
> bound\_address {inet[/0:0:0:0:0:0:0:0:9301]}, publish\_address {inet[/  
> 10.226.20.99:9301]}  
> _[2014-03-03 11:47:14,298][WARN][discovery] [NodeA]  
> waited for 30s and no initial state was set by the discovery_  
> [2014-03-03 11:47:14,299][INFO][discovery] [NodeA]  
> myCluster/BUpJ6SX2TCa8s\_2Z0Zoizw  
> [2014-03-03 11:47:14,306][INFO][http] [NodeA]  
> bound\_address {inet[/0:0:0:0:0:0:0:0:9201]}, publish\_address {inet[/  
> 10.226.20.99:9201]}  
> [2014-03-03 11:47:14,312][INFO][node] [NodeA] started
> 
> I have made the following changes in the respective elasticsearch.yml file
> 
> _Instance 1_  
> cluster.name: myCluster  
> node.name: "NodeA"
> 
> _node.master: true_  
> _node.data: true_  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9301  
> http.port: 9201  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> 
> _Instance 2_  
> cluster.name: myCluster  
> node.name: "NodeB"
> 
> _node.master: true_  
> _node.data: true_  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9302  
> http.port: 9202  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> 
> _Instance 3_  
> cluster.name: myCluster  
> node.name: "NodeC"
> 
> _node.master: true_  
> _node.data: true_  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9303  
> http.port: 9203  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> 
> _Instance 4_  
> cluster.name: myCluster  
> node.name: "NodeD"
> 
> _node.master: false_  
> _node.data: true_  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9304  
> http.port: 9204  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> 
> _Instance 5 (load balancer)_  
> cluster.name: myCluster  
> node.name: "NodeE"
> 
> _node.master: false_  
> _node.data: false_  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9305  
> http.port: 9205  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/af4f7c13-bdc4-4fff-9423-036281a858dd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/af4f7c13-bdc4-4fff-9423-036281a858dd%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [March 3, 2014, 10:36am UTC](https://discuss.elastic.co/t/no-initial-state-was-set-by-discovery-when-running-multiple-instances-of-elasticsearch-in-same-machine/16098/4 "2014-03-03T10:36:07Z")

</div>

I see. You did not set a full list of nodes in unicast property.  
So elasticsearch tries the first port: 9300 and find a node.

It never discovers other nodes I think.

May be you should create a list of IP:9300, IP:9301, IP:9302.

My 2 cents

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 3 mars 2014 à 09:35, soumya sengupta [maverick.soumya@gmail.com](mailto:maverick.soumya@gmail.com) a écrit :

> Started NodeA, NodeB, NodeC
> 
> output for NodeA  
> [2014-03-03 13:14:52,759][INFO][node] [NodeA] version[1.0.0], pid[12562], build[a46900e/2014-02-12T16:18:34Z]  
> [2014-03-03 13:14:52,760][INFO][node] [NodeA] initializing ...  
> [2014-03-03 13:14:52,766][INFO][plugins] [NodeA] loaded , sites   
> [2014-03-03 13:14:57,843][INFO][node] [NodeA] initialized  
> [2014-03-03 13:14:57,843][INFO][node] [NodeA] starting ...  
> [2014-03-03 13:14:58,142][INFO][transport] [NodeA] bound\_address {inet[/0:0:0:0:0:0:0:0:9301]}, publish\_address {inet[/10.226.20.99:9301]}  
> [2014-03-03 13:15:28,230][WARN][discovery] [NodeA] waited for 30s and no initial state was set by the discovery  
> [2014-03-03 13:15:28,263][INFO][discovery] [NodeA] myCluster/t1IdrsN\_QySxedCfnhx3eQ  
> [2014-03-03 13:15:28,273][INFO][http] [NodeA] bound\_address {inet[/0:0:0:0:0:0:0:0:9201]}, publish\_address {inet[/10.226.20.99:9201]}  
> [2014-03-03 13:15:28,631][INFO][node] [NodeA] started
> 
> ouput for NodeB  
> [2014-03-03 13:16:34,744][INFO][node] [NodeB] version[1.0.0], pid[12738], build[a46900e/2014-02-12T16:18:34Z]  
> [2014-03-03 13:16:34,745][INFO][node] [NodeB] initializing ...  
> [2014-03-03 13:16:34,749][INFO][plugins] [NodeB] loaded , sites   
> [2014-03-03 13:16:38,254][INFO][node] [NodeB] initialized  
> [2014-03-03 13:16:38,254][INFO][node] [NodeB] starting ...  
> [2014-03-03 13:16:38,387][INFO][transport] [NodeB] bound\_address {inet[/0:0:0:0:0:0:0:0:9302]}, publish\_address {inet[/10.226.20.99:9302]}  
> [2014-03-03 13:17:08,400][WARN][discovery] [NodeB] waited for 30s and no initial state was set by the discovery  
> [2014-03-03 13:17:08,401][INFO][discovery] [NodeB] myCluster/8U3tZocXRkaeSlY0BVnRJQ  
> [2014-03-03 13:17:08,412][INFO][http] [NodeB] bound\_address {inet[/0:0:0:0:0:0:0:0:9202]}, publish\_address {inet[/10.226.20.99:9202]}  
> [2014-03-03 13:17:08,460][INFO][node] [NodeB] started
> 
> output for nodeC  
> [2014-03-03 13:17:28,330][INFO][node] [NodeC] version[1.0.0], pid[12834], build[a46900e/2014-02-12T16:18:34Z]  
> [2014-03-03 13:17:28,346][INFO][node] [NodeC] initializing ...  
> [2014-03-03 13:17:28,351][INFO][plugins] [NodeC] loaded , sites   
> [2014-03-03 13:17:35,695][INFO][node] [NodeC] initialized  
> [2014-03-03 13:17:35,695][INFO][node] [NodeC] starting ...  
> [2014-03-03 13:17:36,129][INFO][transport] [NodeC] bound\_address {inet[/0:0:0:0:0:0:0:0:9303]}, publish\_address {inet[/10.226.20.99:9303]}  
> [2014-03-03 13:18:06,294][WARN][discovery] [NodeC] waited for 30s and no initial state was set by the discovery  
> [2014-03-03 13:18:06,294][INFO][discovery] [NodeC] myCluster/Di0ckyBtQuSuKts6lWkTdw  
> [2014-03-03 13:18:06,340][INFO][http] [NodeC] bound\_address {inet[/0:0:0:0:0:0:0:0:9203]}, publish\_address {inet[/10.226.20.99:9203]}  
> [2014-03-03 13:18:06,390][INFO][node] [NodeC] started
> 
> I think this is still not working...
> 
> On Monday, March 3, 2014 12:37:19 PM UTC+5:30, soumya sengupta wrote:
> 
> > I am trying to run 5 elasticsearch instances in a single machine each having its own port and elasticsearch.yml files
> > 
> > When I start NodeA, I get the following warning of no initial state was set by discovery  
> > ] [NodeA] version[1.0.0], pid[11165], build[a46900e/2014-02-12T16:18:34Z]  
> > [2014-03-03 11:46:41,049][INFO][node] [NodeA] initializing ...  
> > [2014-03-03 11:46:41,054][INFO][plugins] [NodeA] loaded , sites   
> > [2014-03-03 11:46:44,133][INFO][node] [NodeA] initialized  
> > [2014-03-03 11:46:44,133][INFO][node] [NodeA] starting ...  
> > [2014-03-03 11:46:44,285][INFO][transport] [NodeA] bound\_address {inet[/0:0:0:0:0:0:0:0:9301]}, publish\_address {inet[/10.226.20.99:9301]}  
> > [2014-03-03 11:47:14,298][WARN][discovery] [NodeA] waited for 30s and no initial state was set by the discovery  
> > [2014-03-03 11:47:14,299][INFO][discovery] [NodeA] myCluster/BUpJ6SX2TCa8s\_2Z0Zoizw  
> > [2014-03-03 11:47:14,306][INFO][http] [NodeA] bound\_address {inet[/0:0:0:0:0:0:0:0:9201]}, publish\_address {inet[/10.226.20.99:9201]}  
> > [2014-03-03 11:47:14,312][INFO][node] [NodeA] started
> > 
> > I have made the following changes in the respective elasticsearch.yml file
> > 
> > Instance 1  
> > cluster.name: myCluster  
> > node.name: "NodeA"  
> > node.master: true  
> > node.data: true  
> > index.number\_of\_shards: 5  
> > index.number\_of\_replicas: 2  
> > transport.tcp.port: 9301  
> > http.port: 9201  
> > discovery.zen.minimum\_master\_nodes: 3  
> > discovery.zen.ping.multicast.enabled: false  
> > discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> > 
> > Instance 2  
> > cluster.name: myCluster  
> > node.name: "NodeB"  
> > node.master: true  
> > node.data: true  
> > index.number\_of\_shards: 5  
> > index.number\_of\_replicas: 2  
> > transport.tcp.port: 9302  
> > http.port: 9202  
> > discovery.zen.minimum\_master\_nodes: 3  
> > discovery.zen.ping.multicast.enabled: false  
> > discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> > 
> > Instance 3  
> > cluster.name: myCluster  
> > node.name: "NodeC"  
> > node.master: true  
> > node.data: true  
> > index.number\_of\_shards: 5  
> > index.number\_of\_replicas: 2  
> > transport.tcp.port: 9303  
> > http.port: 9203  
> > discovery.zen.minimum\_master\_nodes: 3  
> > discovery.zen.ping.multicast.enabled: false  
> > discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> > 
> > Instance 4  
> > cluster.name: myCluster  
> > node.name: "NodeD"  
> > node.master: false  
> > node.data: true  
> > index.number\_of\_shards: 5  
> > index.number\_of\_replicas: 2  
> > transport.tcp.port: 9304  
> > http.port: 9204  
> > discovery.zen.minimum\_master\_nodes: 3  
> > discovery.zen.ping.multicast.enabled: false  
> > discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> > 
> > Instance 5 (load balancer)  
> > cluster.name: myCluster  
> > node.name: "NodeE"  
> > node.master: false  
> > node.data: false  
> > index.number\_of\_shards: 5  
> > index.number\_of\_replicas: 2  
> > transport.tcp.port: 9305  
> > http.port: 9205  
> > discovery.zen.minimum\_master\_nodes: 3  
> > discovery.zen.ping.multicast.enabled: false  
> > discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/af4f7c13-bdc4-4fff-9423-036281a858dd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/af4f7c13-bdc4-4fff-9423-036281a858dd%40googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/15D08562-C46F-4518-863E-D74065B53BAE%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/15D08562-C46F-4518-863E-D74065B53BAE%40pilato.fr).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![soumya\_sengupta](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@soumya\_sengupta](https://discuss.elastic.co/u/soumya_sengupta)\
**Post date:** [March 3, 2014, 11:22am UTC](https://discuss.elastic.co/t/no-initial-state-was-set-by-discovery-when-running-multiple-instances-of-elasticsearch-in-same-machine/16098/5 "2014-03-03T11:22:45Z")

</div>

Okk, I will try this out.

Right now, I have changed the discovery from "Unicast" to "Multicast".  
And things have started fine. There is a master node, and every other node  
has discovered it.

Some more things to do like shutting down the master and find whether ES is  
choosing a new master.

One more thing, all my instances are running on different ports(9201 ..  
9205).  
I want the end-user to have a single ip address (an ip assigned to the  
whole cluster) and it should not worry if any node in the cluster goes down.  
I have set the master and data of nodeE to false (thinking of making it  
work like a loadbalancer).  
But if it gets shutdown, the end-user needs to be given a new Ip and a new  
port.

How to overcome this?

On Monday, March 3, 2014 12:37:19 PM UTC+5:30, soumya sengupta wrote:

> I am trying to run 5 elasticsearch instances in a single machine each  
> having its own port and elasticsearch.yml files
> 
> When I start NodeA, I get the following warning of _no initial state was  
> set by discovery_  
> ] [NodeA] version[1.0.0], pid[11165], build[a46900e/2014-02-12T16:18:34Z]  
> [2014-03-03 11:46:41,049][INFO][node] [NodeA]  
> initializing ...  
> [2014-03-03 11:46:41,054][INFO][plugins] [NodeA] loaded  
> , sites   
> [2014-03-03 11:46:44,133][INFO][node] [NodeA]  
> initialized  
> [2014-03-03 11:46:44,133][INFO][node] [NodeA]  
> starting ...  
> [2014-03-03 11:46:44,285][INFO][transport] [NodeA]  
> bound\_address {inet[/0:0:0:0:0:0:0:0:9301]}, publish\_address {inet[/  
> 10.226.20.99:9301]}  
> _[2014-03-03 11:47:14,298][WARN][discovery] [NodeA]  
> waited for 30s and no initial state was set by the discovery_  
> [2014-03-03 11:47:14,299][INFO][discovery] [NodeA]  
> myCluster/BUpJ6SX2TCa8s\_2Z0Zoizw  
> [2014-03-03 11:47:14,306][INFO][http] [NodeA]  
> bound\_address {inet[/0:0:0:0:0:0:0:0:9201]}, publish\_address {inet[/  
> 10.226.20.99:9201]}  
> [2014-03-03 11:47:14,312][INFO][node] [NodeA] started
> 
> I have made the following changes in the respective elasticsearch.yml file
> 
> _Instance 1_  
> cluster.name: myCluster  
> node.name: "NodeA"
> 
> _node.master: true_  
> _node.data: true_  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9301  
> http.port: 9201  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> 
> _Instance 2_  
> cluster.name: myCluster  
> node.name: "NodeB"
> 
> _node.master: true_  
> _node.data: true_  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9302  
> http.port: 9202  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> 
> _Instance 3_  
> cluster.name: myCluster  
> node.name: "NodeC"
> 
> _node.master: true_  
> _node.data: true_  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9303  
> http.port: 9203  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> 
> _Instance 4_  
> cluster.name: myCluster  
> node.name: "NodeD"
> 
> _node.master: false_  
> _node.data: true_  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9304  
> http.port: 9204  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> 
> _Instance 5 (load balancer)_  
> cluster.name: myCluster  
> node.name: "NodeE"
> 
> _node.master: false_  
> _node.data: false_  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9305  
> http.port: 9205  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/fa813aba-32f9-4e23-942c-616cefe8a38b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/fa813aba-32f9-4e23-942c-616cefe8a38b%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [March 3, 2014, 11:27am UTC](https://discuss.elastic.co/t/no-initial-state-was-set-by-discovery-when-running-multiple-instances-of-elasticsearch-in-same-machine/16098/6 "2014-03-03T11:27:26Z")

</div>

You can add a Node (data:false, master:false) which will load balance your queries. It can be a lightweight node and will be very stable.  
Also adding a Nginx layer could help to load balance...

HTH

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 3 mars 2014 à 12:22:50, soumya sengupta ([maverick.soumya@gmail.com](mailto:maverick.soumya@gmail.com)) a écrit:

Okk, I will try this out.

Right now, I have changed the discovery from "Unicast" to "Multicast".  
And things have started fine. There is a master node, and every other node has discovered it.

Some more things to do like shutting down the master and find whether ES is choosing a new master.

One more thing, all my instances are running on different ports(9201 .. 9205).  
I want the end-user to have a single ip address (an ip assigned to the whole cluster) and it should not worry if any node in the cluster goes down.  
I have set the master and data of nodeE to false (thinking of making it work like a loadbalancer).  
But if it gets shutdown, the end-user needs to be given a new Ip and a new port.

How to overcome this?

On Monday, March 3, 2014 12:37:19 PM UTC+5:30, soumya sengupta wrote:  
I am trying to run 5 elasticsearch instances in a single machine each having its own port and elasticsearch.yml files

When I start NodeA, I get the following warning of no initial state was set by discovery  
] [NodeA] version[1.0.0], pid[11165], build[a46900e/2014-02-12T16:18:34Z]  
[2014-03-03 11:46:41,049][INFO][node] [NodeA] initializing ...  
[2014-03-03 11:46:41,054][INFO][plugins] [NodeA] loaded [], sites []  
[2014-03-03 11:46:44,133][INFO][node] [NodeA] initialized  
[2014-03-03 11:46:44,133][INFO][node] [NodeA] starting ...  
[2014-03-03 11:46:44,285][INFO][transport] [NodeA] bound\_address {inet[/0:0:0:0:0:0:0:0:9301]}, publish\_address {inet[/10.226.20.99:9301]}  
[2014-03-03 11:47:14,298][WARN][discovery] [NodeA] waited for 30s and no initial state was set by the discovery  
[2014-03-03 11:47:14,299][INFO][discovery] [NodeA] myCluster/BUpJ6SX2TCa8s\_2Z0Zoizw  
[2014-03-03 11:47:14,306][INFO][http] [NodeA] bound\_address {inet[/0:0:0:0:0:0:0:0:9201]}, publish\_address {inet[/10.226.20.99:9201]}  
[2014-03-03 11:47:14,312][INFO][node] [NodeA] started

I have made the following changes in the respective elasticsearch.yml file

Instance 1  
cluster.name: myCluster  
node.name: "NodeA"  
node.master: true  
node.data: true  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2  
transport.tcp.port: 9301  
http.port: 9201  
discovery.zen.minimum\_master\_nodes: 3  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

Instance 2  
cluster.name: myCluster  
node.name: "NodeB"  
node.master: true  
node.data: true  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2  
transport.tcp.port: 9302  
http.port: 9202  
discovery.zen.minimum\_master\_nodes: 3  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

Instance 3  
cluster.name: myCluster  
node.name: "NodeC"  
node.master: true  
node.data: true  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2  
transport.tcp.port: 9303  
http.port: 9203  
discovery.zen.minimum\_master\_nodes: 3  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

Instance 4  
cluster.name: myCluster  
node.name: "NodeD"  
node.master: false  
node.data: true  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2  
transport.tcp.port: 9304  
http.port: 9204  
discovery.zen.minimum\_master\_nodes: 3  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

Instance 5 (load balancer)  
cluster.name: myCluster  
node.name: "NodeE"  
node.master: false  
node.data: false  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2  
transport.tcp.port: 9305  
http.port: 9205  
discovery.zen.minimum\_master\_nodes: 3  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/fa813aba-32f9-4e23-942c-616cefe8a38b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/fa813aba-32f9-4e23-942c-616cefe8a38b%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.5314671e.2eb141f2.50c7%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.5314671e.2eb141f2.50c7%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![soumya\_sengupta](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@soumya\_sengupta](https://discuss.elastic.co/u/soumya_sengupta)\
**Post date:** [March 3, 2014, 12:06pm UTC](https://discuss.elastic.co/t/no-initial-state-was-set-by-discovery-when-running-multiple-instances-of-elasticsearch-in-same-machine/16098/7 "2014-03-03T12:06:59Z")

</div>

Thanks for your patience and of course for your replies.  
I am really throwing a lot at you today.

Please don't mind as a few more are coming ....

1. If the load balancer machine goes down, what will happen.  
Will I have to create another node of same type right in another machine ?  
But it will have a different IP address which will affect a transparent  
failover.  
I feel this is a far fetched question, but is there support for it in ES?  
I don't know about nginx but have worked with apache loadbalacer..

2. Suppose I have a ES cluster of 'N' number of instances of ES and all of  
them have data distributed among themselves.  
Now later on based on requirements, I want 'M' more instances to join the  
cluster.  
Will the data from previous N instances automatically get migrated to the  
newer M instances ?  
If not, how to configure for the same?

On Monday, March 3, 2014 12:37:19 PM UTC+5:30, soumya sengupta wrote:

> I am trying to run 5 elasticsearch instances in a single machine each  
> having its own port and elasticsearch.yml files
> 
> When I start NodeA, I get the following warning of _no initial state was  
> set by discovery_  
> ] [NodeA] version[1.0.0], pid[11165], build[a46900e/2014-02-12T16:18:34Z]  
> [2014-03-03 11:46:41,049][INFO][node] [NodeA]  
> initializing ...  
> [2014-03-03 11:46:41,054][INFO][plugins] [NodeA] loaded  
> , sites   
> [2014-03-03 11:46:44,133][INFO][node] [NodeA]  
> initialized  
> [2014-03-03 11:46:44,133][INFO][node] [NodeA]  
> starting ...  
> [2014-03-03 11:46:44,285][INFO][transport] [NodeA]  
> bound\_address {inet[/0:0:0:0:0:0:0:0:9301]}, publish\_address {inet[/  
> 10.226.20.99:9301]}  
> _[2014-03-03 11:47:14,298][WARN][discovery] [NodeA]  
> waited for 30s and no initial state was set by the discovery_  
> [2014-03-03 11:47:14,299][INFO][discovery] [NodeA]  
> myCluster/BUpJ6SX2TCa8s\_2Z0Zoizw  
> [2014-03-03 11:47:14,306][INFO][http] [NodeA]  
> bound\_address {inet[/0:0:0:0:0:0:0:0:9201]}, publish\_address {inet[/  
> 10.226.20.99:9201]}  
> [2014-03-03 11:47:14,312][INFO][node] [NodeA] started
> 
> I have made the following changes in the respective elasticsearch.yml file
> 
> _Instance 1_  
> cluster.name: myCluster  
> node.name: "NodeA"
> 
> _node.master: true_  
> _node.data: true_  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9301  
> http.port: 9201  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> 
> _Instance 2_  
> cluster.name: myCluster  
> node.name: "NodeB"
> 
> _node.master: true_  
> _node.data: true_  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9302  
> http.port: 9202  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> 
> _Instance 3_  
> cluster.name: myCluster  
> node.name: "NodeC"
> 
> _node.master: true_  
> _node.data: true_  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9303  
> http.port: 9203  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> 
> _Instance 4_  
> cluster.name: myCluster  
> node.name: "NodeD"
> 
> _node.master: false_  
> _node.data: true_  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9304  
> http.port: 9204  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> 
> _Instance 5 (load balancer)_  
> cluster.name: myCluster  
> node.name: "NodeE"
> 
> _node.master: false_  
> _node.data: false_  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9305  
> http.port: 9205  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2888d5f9-1e51-41d5-84b5-4a7b77cca1a6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2888d5f9-1e51-41d5-84b5-4a7b77cca1a6%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [March 5, 2014, 8:03am UTC](https://discuss.elastic.co/t/no-initial-state-was-set-by-discovery-when-running-multiple-instances-of-elasticsearch-in-same-machine/16098/8 "2014-03-05T08:03:06Z")

</div>

1. the same that will happen with any load balancer I guess. If it does not work, it can not serve you requests anymore !  
You can put two elasticsearch load balancer nodes and manage that on a client level. Official clients can deal with that. I don't for other clients.

2. yes

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 3 mars 2014 à 13:06, soumya sengupta [maverick.soumya@gmail.com](mailto:maverick.soumya@gmail.com) a écrit :

Thanks for your patience and of course for your replies.  
I am really throwing a lot at you today.

Please don't mind as a few more are coming ....

1. If the load balancer machine goes down, what will happen.  
Will I have to create another node of same type right in another machine ? But it will have a different IP address which will affect a transparent failover.  
I feel this is a far fetched question, but is there support for it in ES?  
I don't know about nginx but have worked with apache loadbalacer..

2. Suppose I have a ES cluster of 'N' number of instances of ES and all of them have data distributed among themselves.  
Now later on based on requirements, I want 'M' more instances to join the cluster.  
Will the data from previous N instances automatically get migrated to the newer M instances ?  
If not, how to configure for the same?

> On Monday, March 3, 2014 12:37:19 PM UTC+5:30, soumya sengupta wrote:  
> I am trying to run 5 elasticsearch instances in a single machine each having its own port and elasticsearch.yml files
> 
> When I start NodeA, I get the following warning of no initial state was set by discovery  
> ] [NodeA] version[1.0.0], pid[11165], build[a46900e/2014-02-12T16:18:34Z]  
> [2014-03-03 11:46:41,049][INFO][node] [NodeA] initializing ...  
> [2014-03-03 11:46:41,054][INFO][plugins] [NodeA] loaded , sites   
> [2014-03-03 11:46:44,133][INFO][node] [NodeA] initialized  
> [2014-03-03 11:46:44,133][INFO][node] [NodeA] starting ...  
> [2014-03-03 11:46:44,285][INFO][transport] [NodeA] bound\_address {inet[/0:0:0:0:0:0:0:0:9301]}, publish\_address {inet[/10.226.20.99:9301]}  
> [2014-03-03 11:47:14,298][WARN][discovery] [NodeA] waited for 30s and no initial state was set by the discovery  
> [2014-03-03 11:47:14,299][INFO][discovery] [NodeA] myCluster/BUpJ6SX2TCa8s\_2Z0Zoizw  
> [2014-03-03 11:47:14,306][INFO][http] [NodeA] bound\_address {inet[/0:0:0:0:0:0:0:0:9201]}, publish\_address {inet[/10.226.20.99:9201]}  
> [2014-03-03 11:47:14,312][INFO][node] [NodeA] started
> 
> I have made the following changes in the respective elasticsearch.yml file
> 
> Instance 1  
> cluster.name: myCluster  
> node.name: "NodeA"  
> node.master: true  
> node.data: true  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9301  
> http.port: 9201  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> 
> Instance 2  
> cluster.name: myCluster  
> node.name: "NodeB"  
> node.master: true  
> node.data: true  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9302  
> http.port: 9202  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> 
> Instance 3  
> cluster.name: myCluster  
> node.name: "NodeC"  
> node.master: true  
> node.data: true  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9303  
> http.port: 9203  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> 
> Instance 4  
> cluster.name: myCluster  
> node.name: "NodeD"  
> node.master: false  
> node.data: true  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9304  
> http.port: 9204  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]
> 
> Instance 5 (load balancer)  
> cluster.name: myCluster  
> node.name: "NodeE"  
> node.master: false  
> node.data: false  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> transport.tcp.port: 9305  
> http.port: 9205  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["10.226.20.99"]

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2888d5f9-1e51-41d5-84b5-4a7b77cca1a6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2888d5f9-1e51-41d5-84b5-4a7b77cca1a6%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8ABB449D-570E-49C1-8D9B-D140FBF57962%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/8ABB449D-570E-49C1-8D9B-D140FBF57962%40pilato.fr).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 1:45am UTC](https://discuss.elastic.co/t/no-initial-state-was-set-by-discovery-when-running-multiple-instances-of-elasticsearch-in-same-machine/16098/9 "2017-07-06T01:45:41Z")

</div>


