Thank you for the answer and sorry for the lack of explanations.
I deleted an index folder manually
It's now impossible du play a curl -XDELETE because the server is in
recovery mode and not allowing requests.
All is running as elasticsearch user using elasticsearch 0.17.8 with
the following configuration :
I'm playing on a test server with 1 node and the default configuration
for indices (5 shards and 1 replica).
According to the documentation "The gateway.expected_nodes allows to
set how many nodes are expected to be in the cluster" so i changed the
gateway.expected_nodes from 2 to 1.
If i let the value of 2 for this configuration key, the server starts
correctly because it's not trying to recover.
I tried a :
curl -XDELETE localhost:9200/myindex
but i get the following response :
It's logical as the index does not exist anymore.
With the gateway.expected_nodes at 1, i'm in recovery mode, flooding
the log file :
[WARN ][indices.cluster ] [Sunturion] [myindex failed to
[myindex] shard allocated for local recovery (post api), should
exists, but doesn't
17 at java.util.concurrent.ThreadPoolExecutor
18 at java.lang.Thread.run(Thread.java:636)
[WARN ][cluster.action.shard ] [Sunturion] sending failed shard
for [myindex], node[UAmkAQe_TUusC_OvLEtoxg], [P], s[INITIALIZING],
reason [Failed to start shard , message
allocated for local recovery (post api), should exists, but doesn't]]]
These errors are repeated for every shards of the index.
Is there an error in my way of using the gateway ?
If not, how can i tell the gateway not to recover the deleted index ?
On 15 mar, 09:51, Radu Gheorghe radu0gheor...@gmail.com wrote:
It's unclear for me: is it possible to do a curl -XDELETE now? If so,
that should solve it.
If not, what directory did you remove? And what version of ES are you
using? And how many nodes are in your cluster, with how many shards
I've just deleted /var/lib/elasticsearch/elasticsearch/nodes/0/indices/
twitter/ on a single-node, and it restarted with no error (and no
index, of course).
On Mar 14, 8:10 pm, Johny John johnyjo...@gmail.com wrote:
I manually deleted an index directory instead of playing a curl -
XDELETE localhost:9200/indexName and i'm know stuck with a gateway
recovery exception when i whant to restart the server :
failed to start shard :
[indexname] shard allocated for local recovery (post api), should
exists, but doesn't
The recevory precedure is looking for a shard that belongs to the
When i restart the server it recreates the index directory and the sub
translog dir but everything is empty.
What is the translog file to clean to prevent the recovery ?
Is there any other solution ?
Thank you for.