记录一次elasticsearch状态为red的问题修复

本文记录了一次Elasticsearch集群健康值为红色的问题,问题源于translog文件损坏。通过删除translog文件和重置路由成功解决了恢复失败的问题。在执行删除操作前需谨慎,确保数据安全。解决方案包括使用curl发送HTTP请求进行路由重置。

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

问题描述

使用elasticsearch-head-master查看到集群健康值为**red(14 of 30)**。其中一个index的shard 2 恢复失败,失败原因描述如下。
failed shard on node [IEiX75zpThqncQK8SNAvcQ]: failed recovery, failure RecoveryFailedException[[tqmp][2]: Recovery failed on {node-1}{IEiX75zpThqncQK8SNAvcQ}{v1SutLQ0QLa-nA0BFhtucQ}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=17179283456, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true}]; nested: IndexShardRecoveryException[failed to recover from gateway]; nested: EngineCreationFailureException[failed to create engine]; nested: TranslogCorruptedException[translog from source [D:\elasticsearch-6.8.5\data\nodes\0\indices\oNCtZsHNR4e_peCcHi-cuQ\2\translog\translog-69.ckp] is corrupted, checkpoint file translog-69.ckp already exists but has corrupted content: expected Checkpoint{offset=155, numOps=1, generation=69, minSeqNo=136, maxSeqNo=136, globalCheckpoint=135, minTranslogGeneration=69, trimmedAboveSeqNo=-2} but got Checkpoint{offset=55, n

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值