shard_not_found_exception: Shard not found(未找到分片)
Elasticsearch含义
未找到目标分片。Elasticsearch 无法访问指定索引的相关分片,因此无法完成请求。
原因
分片尚未分配(unassigned)或正在恢复;节点离开集群导致分片暂时缺失;或直接路由到分片的底层请求携带了已失效的路由信息。在集群健康状况下降时出现。
解决方法
检查集群和分片健康状况:GET _cluster/health 和 GET _cat/shards?v。查看分片未分配的原因:GET _cluster/allocation/explain。如果丢失了节点,将其恢复;检查磁盘/分配设置(watermark)。如果恢复正在进行,等待其完成。保持足够的副本数,使单个节点丢失时数据仍然可用。
同一数据库的其他条目
- snapshot_missing_exceptionSnapshot is missing(快照不存在)
- index_template_missing_exceptionIndex template is missing(索引模板不存在)
- settings_exceptionInvalid settings(无效的设置)
- not_x_content_exceptionCompressor detection error / body is not valid content(压缩格式检测错误/请求体不是有效内容)
- document_source_missing_exceptionDocument source is missing(文档 source 不存在)
- node_not_connected_exceptionNode is not connected(节点未连接)
- receive_timeout_transport_exceptionRequest timed out waiting for a response from another node(等待另一节点响应时请求超时)