ElasticSearch snapshot leaving unreplicated index


(Dan Ackroyd) #1

Hi,

Please could someone explain what 'snapshot' indexes are, and what should be done to make my ES cluster be green again? What I've been doing to encounter these is this:

I'm creating a snapshot of an old ElasticSearch cluster that is still running 1.3.4.

I've setup a file system repository and then attempted to create a snapshot with:

curl -XPUT 'http://127.0.0.1:9900/snapshot/es_hot_backup/snapshot_1'

However that gave an error:

{"error":"MapperParsingException[failed to parse, document is empty]","status":400}

Running the command again with 'ignore_unavailable' set, like this:

curl -XPUT "http://127.0.0.1:9900/_snapshot/es_hot_backup/snapshot_1" -d '{
     "ignore_unavailable": true
}'

The command appears to have worked

{"accepted":true}

However now the status of the cluster is no longer green, as it appears that a 'snapshot' index has been created, but in a way that means it is not replicated across the cluster:

http://127.0.0.1:9900/_cat/shards?v

index    shard prirep state      docs store ip         node         
snapshot 2     p      STARTED       0  115b 172.18.0.2 Space Turnip 
snapshot 2     r      UNASSIGNED                                    
snapshot 0     p      STARTED       0  115b 172.18.0.2 Space Turnip 
snapshot 0     r      UNASSIGNED                                    
snapshot 3     p      STARTED       0  115b 172.18.0.2 Space Turnip 
snapshot 3     r      UNASSIGNED                                    
snapshot 1     p      STARTED       0  115b 172.18.0.2 Space Turnip 
snapshot 1     r      UNASSIGNED                                    
snapshot 4     p      STARTED       0  115b 172.18.0.2 Space Turnip 
snapshot 4     r      UNASSIGNED                                    

(I initially started running the snapshot on production, but switched to a test environment once the initial snapshot command gave a weird error. Yes, I should have done it in test from the start. :p).

Please can someone advise what should I do with that non-replicated index, so as to make the ElasticSearch cluster be green again.

cheers
Dan
Ack


(Mark Walkom) #2

How many nodes in the cluster?


(Dan Ackroyd) #3

Hi @warkolm,

Thanks for the response. It turns out that PEBKAC.

I had a type on the first command.....I missed out the underscore in the first snapshot command, which obviously resulted in ES creating the index, but giving that error message.

Not having a type should fix this problem.

cheers
Dan


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.