到这个节点上查看下es日志,如果是Lucene文件损坏导致无法加载该shard,错误信息如IndexShardRecoveryException[failed to recovery from gateway]; nested: EngineCreationFailureException[failed to create engine]; nested: CorruptIndexException[codec header mismatch: actual header=18390727 vs expected header=1071082519 (resource=NIOFSIndexInput(path=
1 个回复
JackGe
赞同来自: ghnjk
修复方法
1、进入对应的索引目录,分别进入每个shard的index目录
2、如果目录下有corrupted_...文件,先删除该文件 rm corrupted_FVK4rwq-RxezgiLKDxwvng
3、在该目录下运行lucene修复工具:java -cp /data0/elasticsearch/lib/lucene-core-5.5.0.jar -ea:org.apache.lucene... org.apache.lucene.index.CheckIndex -exorcise ./