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

Prevent Your Next ELK Incident

Try our free Check Up to test if your ES issues are caused from misconfigured settings

Fix Issue

Updated: Jan-20

In Page Navigation (click to jump) :
Troubleshooting Background       
Related Issues  
Log Context
About Opster

Opster Offer’s World-Class Elasticsearch Expertise In One Powerful Product
Try Our Free ES Check-Up   Prevent Incident

Troubleshooting background

To troubleshoot Elasticsearch log “Failed to update restore state” it’s important to understand common problems related to Elasticsearch concepts: restore, snapshots. See detailed explanations below 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 :

1 Github Issue Number 26453  

2Github Issue Number 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.

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

Need help with any Elasticsearch issue ? Contact Opster

Did this page help you?