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

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.
To view this discussion on the web visit 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.

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

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

Le 3 mars 2014 à 08:07, soumya sengupta 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.
To view this discussion on the web visit 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.

--
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.
To view this discussion on the web visit 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.

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.
To view this discussion on the web visit 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.

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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 3 mars 2014 à 09:35, soumya sengupta 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.
To view this discussion on the web visit 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.

--
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.
To view this discussion on the web visit 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.

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.
To view this discussion on the web visit 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.

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
@dadoonet | @elasticsearchfr

Le 3 mars 2014 à 12:22:50, soumya sengupta (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.
To view this discussion on the web visit 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.

--
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.
To view this discussion on the web visit 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.

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.
To view this discussion on the web visit 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.

  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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 3 mars 2014 à 13:06, soumya sengupta 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.
To view this discussion on the web visit 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.

--
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.
To view this discussion on the web visit 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.