Hi there,
few weeks ago I had a problem with some unassigned shards, where I had same
number of unassigned and assigned and I solved that thanks to an advice (
herehttps://groups.google.com/forum/#!searchin/elasticsearch/unassigned$20shards/elasticsearch/Y2QQ-G0hICM/weIznt5PkKQJ)
with adding a new node.
But now it appeared another problem. I had unassigned shards even 2 nodes
were running. So I decided to turn off the replica. That caused
disappearing of half shards (of course), but some unassigned were still
remaining.
So I tried to add few new nodes. I ended on 10 nodes. Thanks to that some
shards disappeared, but most of them did not. But if I turn them down and
then start only one node again (it should be enough without replica), this
is the health status:
{
"cluster_name" : "elasticsearch",
"status" : "red",
"timed_out" : false,
"number_of_nodes" : 2,
"number_of_data_nodes" : 1,
"active_primary_shards" : 22,
"active_shards" : 22,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 198
}
So 1/10 was assigned and 9/10 was not. It seems the shards are still
"connected" to old nodes and I have to reroute them to the only one node.
But I couldn't do it.
I used thishttp://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-reroute.html webpage
and following code:
curl -XPOST 'localhost:9200/_cluster/reroute' -d '{
"commands" : [ {
"allocate" : {
"index" : "logstash-2013.12.10",
"shard" : 0,
"node" : "Q6hyVtoPTrSxm_xIGTg3CQ",
"allow_primary": 1
}
}
]
}'
(first without allow_primary, but it throws error "trying to allocate a
primary shard [logstash-2013.12.10][0]], which is disabled" so I used the
allow_primary flag), but also throws some exception:
org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException:
[logstash-2013.12.10][0] shard allocated for local recovery (post api),
should exists, but doesn't
So I really don't know, what can I do or if I am doing right steps.
Can somebody give me an advice, please?
Thank you
--
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/d0585313-ee35-435b-b530-ff8389a2577c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.