Hi. We've had a disk problem last night, causing a whole slew of issues in our Elasticsearch cluster. We've been able to resolve all of them but one: 1 (replica-less) shard is problematic. However, this is an issue we haven't seen yet, and we haven't found any reference to it nor any way of fixing it. The "bottom" error seems to be the one in the title, i.e.
Caused by: java.lang.IllegalArgumentException: requested snapshot generation [10] is not available. Min referenced generation is [11]
Here's the full error log:
[2021-02-15T12:42:57,479][WARN ][o.e.i.c.IndicesClusterStateService] [Elastic1] [[index_1084][2]] marking and sending shard failed due to [failed recovery]
org.elasticsearch.indices.recovery.RecoveryFailedException: [index_1084][2]: Recovery failed on {Elastic1}{DYEyUuc6RKKbmLgErwcOfg}{ZN5-3mCgQR-AXt8SKJ3vRQ}{10.0.2.52}{10.0.2.52:9300}{ml.machine_memory=37965348864, xpack.installed=true, box_type=warm, ml.max_open_jobs=20, ml.enabled=true}
at org.elasticsearch.index.shard.IndexShard.lambda$startRecovery$9(IndexShard.java:2396) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:708) [elasticsearch-6.8.13.jar:6.8.13]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_282]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_282]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_282]
Caused by: org.elasticsearch.index.shard.IndexShardRecoveryException: failed to recover from gateway
at org.elasticsearch.index.shard.StoreRecovery.internalRecoverFromStore(StoreRecovery.java:445) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.StoreRecovery.lambda$recoverFromStore$0(StoreRecovery.java:95) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.StoreRecovery.executeRecovery(StoreRecovery.java:310) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.StoreRecovery.recoverFromStore(StoreRecovery.java:93) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.IndexShard.recoverFromStore(IndexShard.java:1739) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.IndexShard.lambda$startRecovery$9(IndexShard.java:2392) ~[elasticsearch-6.8.13.jar:6.8.13]
... 4 more
Caused by: org.elasticsearch.index.engine.EngineException: failed to recover from translog
at org.elasticsearch.index.engine.InternalEngine.recoverFromTranslogInternal(InternalEngine.java:455) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.engine.InternalEngine.recoverFromTranslog(InternalEngine.java:425) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.engine.InternalEngine.recoverFromTranslog(InternalEngine.java:111) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.IndexShard.openEngineAndRecoverFromTranslog(IndexShard.java:1449) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.StoreRecovery.internalRecoverFromStore(StoreRecovery.java:440) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.StoreRecovery.lambda$recoverFromStore$0(StoreRecovery.java:95) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.StoreRecovery.executeRecovery(StoreRecovery.java:310) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.StoreRecovery.recoverFromStore(StoreRecovery.java:93) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.IndexShard.recoverFromStore(IndexShard.java:1739) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.IndexShard.lambda$startRecovery$9(IndexShard.java:2392) ~[elasticsearch-6.8.13.jar:6.8.13]
... 4 more
Caused by: java.lang.IllegalArgumentException: requested snapshot generation [10] is not available. Min referenced generation is [11]
at org.elasticsearch.index.translog.Translog.newSnapshotFromGen(Translog.java:614) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.engine.InternalEngine.recoverFromTranslogInternal(InternalEngine.java:451) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.engine.InternalEngine.recoverFromTranslog(InternalEngine.java:425) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.engine.InternalEngine.recoverFromTranslog(InternalEngine.java:111) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.IndexShard.openEngineAndRecoverFromTranslog(IndexShard.java:1449) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.StoreRecovery.internalRecoverFromStore(StoreRecovery.java:440) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.StoreRecovery.lambda$recoverFromStore$0(StoreRecovery.java:95) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.StoreRecovery.executeRecovery(StoreRecovery.java:310) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.StoreRecovery.recoverFromStore(StoreRecovery.java:93) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.IndexShard.recoverFromStore(IndexShard.java:1739) ~[elasticsearch-6.8.13.jar:6.8.13]
at org.elasticsearch.index.shard.IndexShard.lambda$startRecovery$9(IndexShard.java:2392) ~[elasticsearch-6.8.13.jar:6.8.13]
... 4 more
We've tried the elasticsearch-translog tool, but to no avail:
>> Translog is clean at /var/lib/elasticsearch/cluster/nodes/0/indices/DyIuag3dQk-scfRrAPNBfw/2/translog
Exception in thread "main" ElasticsearchException[Shard does not seem to be corrupted at /var/lib/elasticsearch/cluster/nodes/0/indices/DyIuag3dQk-scfRrAPNBfw/2]
Anyone has seen this before and has any idea how to fix it?