master_not_discovered_exception: master_not_discovered_exception / MasterNotDiscoveredException(未发现 master 节点)
Elasticsearch含义
集群无法选举/找到活动的 master 节点。没有 master,就无法进行分片分配、mapping 变更和集群状态更新;集群将无法处理操作。
原因
多数(quorum)master-eligible 节点不可达、网络分区(防止脑裂)、discovery.seed_hosts / cluster.initial_master_nodes 配置错误、新安装未执行 bootstrap,或 master-eligible 节点过少。
解决方法
确认 master-eligible 节点正在运行且彼此可见:GET _cat/nodes?v 和 GET _cluster/state。检查 discovery.seed_hosts 和 cluster.initial_master_nodes 设置(首次部署时)。核实网络/防火墙以及节点间(transport 9300)的连通性。保持足够数量的 master-eligible 节点(最好为 3 个)运行。在日志中查看 master 选举相关消息。
同一数据库的其他条目
- cluster_health_redcluster health status: RED / unassigned shards(集群健康状态:RED / 未分配的分片)
- no_shard_available_action_exceptionno_shard_available_action_exception: No shard available for [...](没有可用的分片)
- es_rejected_execution_exceptiones_rejected_execution_exception: rejected execution of ... on ... (queue capacity ...) (HTTP 429)(线程池队列已满,执行被拒绝)
- security_exceptionsecurity_exception: unable to authenticate / action [...] is unauthorized for user [...] (HTTP 401/403)(无法认证 / 用户无权执行该操作)
- validation_exceptionvalidation_exception / illegal_argument_exception: Validation Failed: ...(校验失败)
- task_cancelled_exceptiontask_cancelled_exception: Task was cancelled / TaskCancelledException(任务已被取消)
- action_request_validation_exceptionaction_request_validation_exception