elasticsearch - elasticsearch降级挑战:分配给本地恢复的分片(后api)应该存在,但不存在

标签 elasticsearch elasticsearch-indices

通过brew uninstall elasticsearch卸载elasticsearch 0.9.x之后,我通过brew install elasticsearch-0.20安装elasticsearch 0.20.6。

当我通过启动服务器时

elasticsearch -f -D es.config=/usr/local/opt/elasticsearch-0.20/config/elasticsearch.yml

服务器无休止地记录以下异常:
[2014-09-04 18:06:14,613][WARN ][cluster.action.shard     ] [Jann] sending failed shard for [sensei_cucumber_news_feeds][0], node[gne6S-UYQPWnR9FqtKg_mw], [P], s[INITIALIZING], reason [Failed to start shard, message [IndexShardGatewayRecoveryException[[sensei_cucumber_news_feeds][0] shard allocated for local recovery (post api), should exists, but doesn't]]]
[2014-09-04 18:06:14,634][WARN ][indices.cluster          ] [Jann] [sensei_cucumber_news_feeds][0] failed to start shard
org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException: [sensei_cucumber_news_feeds][0] shard allocated for local recovery (post api), should exists, but doesn't
    at org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:122)
    at org.elasticsearch.index.gateway.IndexShardGatewayService$1.run(IndexShardGatewayService.java:174)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:695)

我也想知道为什么索引仍然存在。卸载后应该删除索引,对吗?
localhost:9200/_cluster/health?pretty=true显示红色信号:
{
  "cluster_name": "elasticsearch_gawlim",
  "status": "red",
  "timed_out": false,
  "number_of_nodes": 1,
  "number_of_data_nodes": 1,
  "active_primary_shards": 0,
  "active_shards": 0,
  "relocating_shards": 0,
  "initializing_shards": 4,
  "unassigned_shards": 867
}

当我尝试在服务器上执行搜索请求时,我得到了
SearchPhaseExecutionException Failed to execute phase [query], total failure; shardFailures: No active shards

删除索引查询有效。

最佳答案

我通过以下命令手动删除了索引,现在它可以工作了:

curl -XDELETE 'http://localhost:9200/index_name'

关于elasticsearch - elasticsearch降级挑战:分配给本地恢复的分片(后api)应该存在,但不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25670599/

相关文章:

java - 如何定义自定义分析器以使用 hibernate-search 和 elasticsearch 进行全局搜索

elasticsearch - Grafana 4 模板与 Elasticsearch 5

regex - Elasticsearch named_pa​​ttern

mongoDB 与 elasticsearch 查询/聚合性能比较

elasticsearch - 使用 gradle 设置基本插件

elasticsearch - 如何在elasticsearch查询中执行搜索?

Elasticsearch更新索引模板

javascript - Elasticsearch 删除索引列表,Javascript 客户端失败,错误代码为 "No Living connections"

performance - 'delete index'命令在ES内部如何工作?

node.js elasticsearch API查询搜索请求发送POST方法而不是GET