-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
Hi,
Creating a snapshot of a single index reports it finished correctly through _snapshot/_status ("state": "SUCCESS"), but a NullPointerException is thrown and the snapshot eventually does not show up in the repository.
Elasticsearch version:
6.2.3
Plugins installed:
ingest-attachment
ingest-geoip
mapper-murmur3
mapper-size
repository-azure
repository-gcs
repository-s3
JVM version:
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
OS version:
Linux 4.13.0-1011-azure #14-Ubuntu SMP 2018 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
We've recently upgraded our elasticsearch cluster from v5.2.2 to v6.2.3, running both clusters in parallel and used the snapshots feature on Azure blob storage to replicate the data to the new cluster. After migration, new snapshot creation tasks are executed daily for backup from the new v6.2.3 cluster onto the same repositories. Initiating the create snapshots succeeds, taking the expected amount of time to copy the data to Azure and even reporting "state": "SUCCESS" on _snapshot/_status:
{
"snapshots": [
{
"snapshot": "2_newlogs_20180328",
"repository": "2_newlogs",
"uuid": "ds3cBPQOSpqIOt53-ImKBw",
"state": "SUCCESS",
"include_global_state": false,
"shards_stats": {
"initializing": 0,
"started": 0,
"finalizing": 0,
"done": 2,
"failed": 0,
"total": 2
},
"stats": {
"number_of_files": 147,
"processed_files": 147,
"total_size_in_bytes": 12541757401,
"processed_size_in_bytes": 12541757401,
"start_time_in_millis": 1524411697845,
"time_in_millis": 462463
},
"indices": {
"2_newlogs_20180328-01": {
"shards_stats": {
"initializing": 0,
"started": 0,
"finalizing": 0,
"done": 2,
"failed": 0,
"total": 2
},
"stats": {
"number_of_files": 147,
"processed_files": 147,
"total_size_in_bytes": 12541757401,
"processed_size_in_bytes": 12541757401,
"start_time_in_millis": 1524411697845,
"time_in_millis": 462463
},
"shards": {
"0": {
"stage": "DONE",
"stats": {
"number_of_files": 63,
"processed_files": 63,
"total_size_in_bytes": 6270745558,
"processed_size_in_bytes": 6270745558,
"start_time_in_millis": 1524411697845,
"time_in_millis": 439319
}
},
"1": {
"stage": "DONE",
"stats": {
"number_of_files": 84,
"processed_files": 84,
"total_size_in_bytes": 6271011843,
"processed_size_in_bytes": 6271011843,
"start_time_in_millis": 1524411697863,
"time_in_millis": 462445
}
}
}
}
}
}
]
}
After the create snapshot finishes (_snapshot/_status returns an empty array), the snapshot does not show up in the repository and a NullPointerException is thrown in the master node logs:
[2018-04-22T15:49:20,567][WARN ][o.e.s.SnapshotsService ] [prod-elasticsearch-master-003] [2_newlogs:2_newlogs_20180328/ds3cBPQOSpqIOt53-ImKBw] failed to finalize snapshot
java.lang.NullPointerException: null
at org.elasticsearch.repositories.RepositoryData.snapshotsToXContent(RepositoryData.java:341) ~[elasticsearch-6.2.4-SNAPSHOT.jar:6.2.4-SNAPSHOT]
at org.elasticsearch.repositories.blobstore.BlobStoreRepository.writeIndexGen(BlobStoreRepository.java:674) ~[elasticsearch-6.2.4-SNAPSHOT.jar:6.2.4-SNAPSHOT]
at org.elasticsearch.repositories.blobstore.BlobStoreRepository.finalizeSnapshot(BlobStoreRepository.java:470) ~[elasticsearch-6.2.4-SNAPSHOT.jar:6.2.4-SNAPSHOT]
at org.elasticsearch.snapshots.SnapshotsService.lambda$endSnapshot$3(SnapshotsService.java:974) ~[elasticsearch-6.2.4-SNAPSHOT.jar:6.2.4-SNAPSHOT]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:573) [elasticsearch-6.2.4-SNAPSHOT.jar:6.2.4-SNAPSHOT]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_151]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
This has been replicated with multiple create snapshots operations on multiple repositories.
Additionally, deleting the repository (without individually deleting the snapshots it contains) and re-creating it (thereby loading the available snapshots from 5.2.2) did not solve the problem.
I'd be happy to provide any additional information as needed.
Thanks!