Elasticsearch上的集群块异常

时间:2017-02-07 13:33:23

标签: elasticsearch

运行方法时,我的弹性搜索出现问题:

GET _search {"query": {"match_all": {}}}

ES回归:

{"error": "ClusterBlockException[blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];]","status": 503}

1 个答案:

答案 0 :(得分:1)

嗯,通常这是一个配置问题,你有两个很快就想做。

1 - 将您的ES配置恢复为默认值,通常在此处:

/etc/elasticsearch/elasticsearch.yml

2 - 禁用(评论)此类发现和网关配置如下:

############# Discovery #############
#discovery.zen.ping.unicast.hosts: ["10.0.0.1"]


############# Gateway #############
#gateway.recover_after_nodes: 2
#gateway.recover_after_time: 3m
#gateway.expected_nodes: 3

然后,重启elasticsearch