我将elasticsearch作为一个单节点集群。
其中一个索引为黄色,解释如下。
我已经阅读了这里所有的材料,总的来说,我没有找到解决这个问题的方法。以下是索引信息: yellow open research-pdl 8_TrwZieRM6oBes8sGBUWg 1 1 416656058 0 77.9gb 77.9gb
此命令 POST _cluster/reroute?retry_failed
似乎什么都没做。
安装程序正在docker上运行,我有650gb的可用空间。
{
"index" : "research-pdl",
"shard" : 0,
"primary" : false,
"current_state" : "unassigned",
"unassigned_info" : {
"reason" : "CLUSTER_RECOVERED",
"at" : "2020-12-16T05:21:19.977Z",
"last_allocation_status" : "no_attempt"
},
"can_allocate" : "no",
"allocate_explanation" : "cannot allocate because allocation is not permitted to any of the nodes",
"node_allocation_decisions" : [
{
"node_id" : "5zzXP2kCQ9eDI0U6WY4j9Q",
"node_name" : "37f65704d9bb",
"transport_address" : "172.19.0.2:9300",
"node_attributes" : {
"ml.machine_memory" : "67555622912",
"xpack.installed" : "true",
"transform.node" : "true",
"ml.max_open_jobs" : "20"
},
"node_decision" : "no",
"deciders" : [
{
"decider" : "same_shard",
"decision" : "NO",
"explanation" : "a copy of this shard is already allocated to this node [[research-pdl][0], node[5zzXP2kCQ9eDI0U6WY4j9Q], [P], s[STARTED], a[id=J7IX30jBSP2jXl5-IGp0BQ]]"
}
]
}
]
}
谢谢
1条答案
按热度按时间dsf9zpds1#
异常消息非常清楚,由于高可用性原因,elasticsearch从不在同一节点上分配同一主碎片的副本。
此碎片的副本已分配给此节点[[research pdl][0],节点[5zzxp2kcq9edi0u6wy4j9q],[p],s[started],a[id=j7ix30jbsp2jxl5-igp0bq]]
由于您只有一个节点群集,因此您将没有其他节点可以在其中分配副本。
解决
向集群中添加更多节点,以便可以在其他节点上分配副本(首选方式)
将副本碎片减少到0,这可能会导致数据丢失和性能问题(如果您没有添加数据节点的选项,并且希望集群处于绿色状态)。
您可以使用集群更新api更新副本计数。