Failed to create snapshot – no longer a master – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-7.17

Briefly, this error occurs when the Elasticsearch node, which was initially the master node during the snapshot creation process, loses its master status. This could be due to network issues, heavy load, or configuration problems causing the cluster state to change. To resolve this, ensure the stability of your network, balance the load across your nodes, and check your cluster’s health regularly. Also, consider increasing the master election timeout setting to give the master node more time to respond before a new master is elected.

This guide will help you check for common problems that cause the log ” [{}] failed to create snapshot – no longer a master ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: master, snapshot.

Log Context

Log “[{}] failed to create snapshot – no longer a master” classname is
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                        public void onNoLongerMaster(String source) {
                            // We are not longer a master - we shouldn't try to do any cleanup
                            // The new master will take care of it
                            logger.warn("[{}] failed to create snapshot - no longer a master"; snapshot.snapshot().getSnapshotId());
                                new SnapshotException(snapshot.snapshot(); "master changed during snapshot initialization")


How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?