How To Solve Issues Related to Log – Failed to update restore state

Get an Elasticsearch Check-Up


Check if your ES issues are caused from misconfigured settings
(Free 2 min process)

ES Check Up

Elasticsearch Error Guide In Page Navigation :

Troubleshooting Background – start here to get the full picture       
Related Issues – selected resources on related issues  
Log Context – usefull for experts
About Opster – offering a diffrent approach to troubleshoot Elasticsearch

Check My Elasticsearch 


Troubleshooting background

To troubleshoot Elasticsearch log “Failed to update restore state” it’s important to know common problems related to Elasticsearch concepts: restore, snapshots. See below-detailed explanations complete with common problems, examples and useful tips.

Restore in Elasticsearch

What it is

In Elasticsearch, restore refers to a snapshot restore mechanism. A snapshot restore can be carried out once you have already set up the snapshot repository and have taken the snapshot. You can restore the entire cluster from the snapshot or restore an individual index or selected indices.

Examples

To restore the whole snapshot :

POST /_snapshot/my_backup/snapshot-01-11-2019/_restore

To restore an individual index :

POST /_snapshot/my_backup/snapshot-01-11-2019/_restore
{
  "indices": "my_index"
}
Notes
  • The snapshot restore capability must be enabled in elasticsearch.yml in case you are using security tools like Searchguard. Otherwise, it will throw a security exception.
Common Problems:
  • If an index or indices already exist with the same names as those you are going to restore, they need to either be closed or deleted before you can restore from a snapshot. Otherwise, the restore operation will fail due to an error that the index already exists.


To help troubleshoot related issues we have gathered selected Q&A from the community and issues from Github , please review the following for further information :

Github Issue Number 26453
github.com/elastic/elasticsearch/issues/26453

 

Github Issue Number 23199
github.com/elastic/elasticsearch/issues/23199

 


Log Context

Log ”Failed to update restore state” classname is RestoreService.java
We have extracted the following from Elasticsearch source code to get an in-depth context :

         try {
            if (event.localNodeMaster()) {
                cleanupRestoreState(event);
            }
        } catch (Exception t) {
            logger.warn("Failed to update restore state "; t);
        }
    }

    /**
     * Checks if a repository is currently in use by one of the snapshots






About Opster

Incorporating deep knowledge and broad history of Elasticsearch issues. Opster’s solution identifies and predicts root causes of Elasticsearch problems, provides recommendations and can automatically perform various actions to manage, troubleshoot and prevent issues

We are constantly updating our analysis of Elasticsearch logs, errors, and exceptions. Sharing best practices and providing troubleshooting guides.

Learn more: Glossary | Blog| Troubleshooting guides | Error Repository

Need help with any Elasticsearch issue ? Contact Opster

Did this page help you?