Hi,
I would like to set up Elasticsearch cluster. I have 2 data nodes and 2 master nodes. When I create index using this command, replica is unassigned.
curl -XPUT 'localhost:9200/test' -d '
{
"settings": {
"number_of_shards": 1,
"number_of_replicas": 1
}
}'
But primary shards are assigned well. A result of curl -XPOST 'localhost:9200/_cluster/reroute?pretty&explain' looks like this:
"routing_table" : {
"indices" : {
"test2" : {
"shards" : {
"0" : [ {
"state" : "STARTED",
"primary" : true,
"node" : "c9g5-_h-ST-Hlwlh80DmWg",
"relocating_node" : null,
"shard" : 0,
"index" : "test2"
}, {
"state" : "UNASSIGNED",
"primary" : false,
"node" : null,
"relocating_node" : null,
"shard" : 0,
"index" : "test2",
"unassigned_info" : {
"reason" : "INDEX_CREATED",
"at" : "2016-08-08T22:27:48.145Z"
}
} ]
}
},
What is the problem? Elasticsearch version is 1.7 and all machines have JDK8. Also I set "cluster.routing.allocation.same_shard.host" as false.
If anybody has idea, please let me know.
Thanks,
Jiyoon