Q:非洲食人族的酋长吃什么?

Primary shard is not active or isn't assigned to a known node.

Elasticsearch | 作者 LiuyangMeng | 发布于2018年10月26日 | 阅读数:2465

elasticsearch 2.1.1
CentOS 6.5 64位
服务器宕机后重启 elasticsearch 后,发现正常的搜索没问题,但是通过 python 去删除和添加数据时失败,提示问题如下:
[2018-10-25 22:52:24,693][INFO ][rest.suppressed          ] /market_search/appinfo/2140515 Params: {id=2140515, index=market_search, type=appinfo}
UnavailableShardsException[[market][0] Primary shard is not active or isn't assigned to a known node. Timeout: [1m], request: delete {[market_search][appinfo][2140515]}]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryPhase.retryBecauseUnavailable(TransportReplicationAction.java:660)
    at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryPhase.doRun(TransportReplicationAction.java:378)
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
    at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryPhase$3.onTimeout(TransportReplicationAction.java:520)
    at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:239)
    at org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:574)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
 
部署了两台服务器
服务器1配置文件为:
network.host: X.X.X.1
cluster.name: elasticsearch
node.name: "node3"
node.master: true
node.data: true
discovery.zen.ping.multicast.enabled: true
discovery.zen.ping.unicast.hosts: ["X.X.X.1","X.X.X.2"]
 
服务器2配置文件为:
network.host: X.X.X.2
cluster.name: elasticsearch
node.name: "node4"
node.master: false
node.data: true
discovery.zen.ping.multicast.enabled: true
discovery.zen.ping.unicast.hosts: ["X.X.X.1","X.X.X.2"]
 
希望社区里面有精通的人给予帮助
已邀请:

hanbj

赞同来自:

重启的这台正常加入集群没,搜索可能是只搜索了你这台正常的机器,搜索的结果中失败分片的个数是不是大于0

zqc0512 - andy zhou

赞同来自:

加入集群失败了。2个节点……
你看看另外一个节点的日志吧。

要回复问题请先登录注册