主分片未处于活动状态或未分配给已知节点吗? [英] Primary shard is not active or isn't assigned is a known node ?

查看:180
本文介绍了主分片未处于活动状态或未分配给已知节点吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows 8上运行弹性搜索版本4.1.我试图通过Java为文档建立索引.运行JUNIT测试时,错误显示如下.

I am running an elastic search version 4.1 on windows 8. I tried to index a document through java. When running a JUNIT test the error appears as below.

org.elasticsearch.action.UnavailableShardsException: [wms][3] Primary shard is not active or isn't assigned is a known node. Timeout: [1m], request: index {[wms][video][AUpdb-bMQ3rfSDgdctGY], source[{
    "fleetNumber": "45",
    "timestamp": "1245657888",
    "geoTag": "73.0012312,-123.00909",
    "videoName": "timestamp.mjpeg",
    "content": "ASD123124NMMM"
}]}
    at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.retryBecauseUnavailable(TransportShardReplicationOperationAction.java:784)
    at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.doStart(TransportShardReplicationOperationAction.java:402)
    at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$3.onTimeout(TransportShardReplicationOperationAction.java:500)
    at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:239)
    at org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:497)
    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:722)

我不知道为什么会导致此错误发生.当删除数据或索引时,它可以正常工作. 可能是什么原因造成的.

I can not figure out, why causes this error to happen. When a delete data or index it works fine. What might be the possible cause of it.

推荐答案

您应该查看该链接: http://www.elasticsearch.org/guide/zh-CN/elasticsearch/reference/current/index-modules-allocation.html

you should look at that link: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-allocation.html

尤其是该部分:

cluster.routing.allocation.disk.watermark.low控制低 磁盘使用率的水印.默认为85%,表示ES不会 一旦节点使用了超过85%的磁盘,便向节点分配新的碎片. 也可以将其设置为绝对字节值(例如500mb)以防止 如果少于配置的空间量,则ES从分配分片开始 可用.

cluster.routing.allocation.disk.watermark.low controls the low watermark for disk usage. It defaults to 85%, meaning ES will not allocate new shards to nodes once they have more than 85% disk used. It can also be set to an absolute byte value (like 500mb) to prevent ES from allocating shards if less than the configured amount of space is available.

cluster.routing.allocation.disk.watermark.high控制高电平 水印.默认为90%,表示ES将尝试重新定位 如果节点磁盘使用率上升到90%以上,则分片到另一个节点.它可以 也可以设置为绝对字节值(类似于低水位标记) 重新分配碎片的时间少于配置的空间量 在节点上可用.

cluster.routing.allocation.disk.watermark.high controls the high watermark. It defaults to 90%, meaning ES will attempt to relocate shards to another node if the node disk usage rises above 90%. It can also be set to an absolute byte value (similar to the low watermark) to relocate shards once less than the configured amount of space is available on the node.

这篇关于主分片未处于活动状态或未分配给已知节点吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆