我们已经创建了新的ES群集v5.x.我们添加了用于恢复的新备份存储库(旧ES 2.x)。 我们从快照中恢复过来,一切都很好。我们有ES快照的保留期。 我们使用s3存储和repository-s3插件进行备份。 虽然我们的保留期已删除此快照,但我们收到了错误:
{
"error": {
"root_cause": [
{
"type": "snapshot_missing_exception",
"reason": "[s3_repository:snapshot_201701040203/snapshot_201701040203] is missing"
}
],
"type": "snapshot_exception",
"reason": "[s3_repository:snapshot_201701040203/snapshot_201701040203] Snapshot could not be read",
"caused_by": {
"type": "snapshot_missing_exception",
"reason": "[s3_repository:snapshot_201701040203/snapshot_201701040203] is missing",
"caused_by": {
"type": "no_such_file_exception",
"reason": "Blob object [snap-snapshot_201701040203.dat] not found: The specified key does not exist. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: DB308DF310809F58)"
}
}
},
"status": 500
}
完整日志:
[2017-01-30T13:18:57,344][WARN ][r.suppressed ] path: /_snapshot/s3_repository/_all, params: {repository=s3_repository, snapshot=_all}
org.elasticsearch.snapshots.SnapshotException: [s3_repository:snapshot_201701040203/snapshot_201701040203] Snapshot could not be read
at org.elasticsearch.snapshots.SnapshotsService.snapshots(SnapshotsService.java:187) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.action.admin.cluster.snapshots.get.TransportGetSnapshotsAction.masterOperation(TransportGetSnapshotsAction.java:122) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.action.admin.cluster.snapshots.get.TransportGetSnapshotsAction.masterOperation(TransportGetSnapshotsAction.java:50) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:86) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$3.doRun(TransportMasterNodeAction.java:170) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:527) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.1.2.jar:5.1.2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_111]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
Caused by: org.elasticsearch.snapshots.SnapshotMissingException: [s3_repository:snapshot_201701040203/snapshot_201701040203] is missing
at org.elasticsearch.repositories.blobstore.BlobStoreRepository.getSnapshotInfo(BlobStoreRepository.java:566) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.snapshots.SnapshotsService.snapshots(SnapshotsService.java:182) ~[elasticsearch-5.1.2.jar:5.1.2]
... 9 more
Caused by: java.nio.file.NoSuchFileException: Blob object [snap-snapshot_201701040203.dat] not found: The specified key does not exist. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: 38087D5B4A20B627)
at org.elasticsearch.cloud.aws.blobstore.S3BlobContainer.readBlob(S3BlobContainer.java:92) ~[?:?]
at org.elasticsearch.repositories.blobstore.ChecksumBlobStoreFormat.readBlob(ChecksumBlobStoreFormat.java:100) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.repositories.blobstore.BlobStoreFormat.read(BlobStoreFormat.java:89) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.repositories.blobstore.BlobStoreRepository.getSnapshotInfo(BlobStoreRepository.java:560) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.snapshots.SnapshotsService.snapshots(SnapshotsService.java:182) ~[elasticsearch-5.1.2.jar:5.1.2]
我尝试删除此快照存储库,删除所有的权限。但是如果我再次添加这个存储库,我会得到同样的错误。 我怎样才能恢复ES?哪些ES获取有关旧快照的信息?
最好的问候。
答案 0 :(得分:0)
我今天遇到了这个问题。我的情况略有不同,但也许这会对你有所帮助。似乎ES 5正在维护存储桶中的快照索引,其中ES 2.x不存在。
在我的场景中,我正在从2.x过渡到5.x.昨天,我将2.x环境创建的一堆快照恢复到5.x环境。昨晚我的2.x环境创建了另一个快照。当我恢复快照时,我得到一个错误,即快照不存在(即使它确实存在)。
如果我在s3存储桶中重命名两个文件,ES 5将重建它的索引并查看新快照。这两个文件是:index-0和index.latest。
希望有所帮助。
答案 1 :(得分:0)
我遇到了类似的问题并按照以下建议解决了这个问题:https://discuss.elastic.co/t/migration-from-es-2-x-to-es-5-x/73211/6(在我的情况下,删除uiOutput
文件并使用ES 5重新注册存储库)