修复异常org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/

本文解决Elasticsearch服务重启后无法启动的问题,详细介绍了使用官方API接口查看集群健康状态及分片恢复情况的方法,确保Elasticsearch集群稳定运行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

elasticsearch服务中断后重启,无法启动报异常如下:

org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized]

利用官方API接口查看健康状态及恢复状态,等待所有分片恢复正常。

健康状态官方API:

https://www.elastic.co/guide/en/elasticsearch/reference/6.2/cluster-health.html

具体命令即:http://127.0.0.1:9200/_cluster/health?wait_for_status=yellow&timeout=50s

查看恢复状态官方API:

https://www.elastic.co/guide/en/elasticsearch/reference/6.2/cat-recovery.html

具体命令即:http://127.0.0.1:9200/_cat/recovery?v&h=i,s,t,ty,st,rep,snap,f,fp,b,bp

查看恢复状态结果

大概几分钟后查看所有索引名称和shard恢复即可。

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值