no_shard_available_action_exception: no_shard_available_action_exception: No shard available for [...](没有可用的分片)
Elasticsearch含义
找不到能够处理请求的活动分片副本。由于相关分片未分配、正在恢复或其所在节点不可达,请求无法完成。
原因
节点崩溃/网络分区、分片未分配、分片恢复正在进行、磁盘水位线导致的分配阻止,或集群处于 RED/YELLOW 状态。
解决方法
检查集群和分片状态:GET _cluster/health 和 GET _cat/shards?v。查看分片未分配的原因:GET _cluster/allocation/explain。恢复崩溃的节点,解决磁盘问题,并等待恢复完成:GET _cat/recovery?v&active_only=true。必要时用 POST _cluster/reroute?retry_failed=true 重试分配。
同一数据库的其他条目
- index_not_found_exceptionindex_not_found_exception: no such index [index_name] (HTTP 404)(索引不存在)
- resource_already_exists_exceptionresource_already_exists_exception: index [index_name/uuid] already exists (HTTP 400)(索引已存在)
- cluster_health_redcluster health status: RED / unassigned shards(集群健康状态:RED / 未分配的分片)
- es_rejected_execution_exceptiones_rejected_execution_exception: rejected execution of ... on ... (queue capacity ...) (HTTP 429)(线程池队列已满,执行被拒绝)
- master_not_discovered_exceptionmaster_not_discovered_exception / MasterNotDiscoveredException(未发现 master 节点)
- security_exceptionsecurity_exception: unable to authenticate / action [...] is unauthorized for user [...] (HTTP 401/403)(无法认证 / 用户无权执行该操作)
- validation_exceptionvalidation_exception / illegal_argument_exception: Validation Failed: ...(校验失败)