Briefly, this error occurs when a node in the Elasticsearch cluster loses its master status. This could be due to network issues, heavy load, or configuration problems causing the cluster to believe that the master node is no longer available. To resolve this issue, you can check the network connectivity between nodes, ensure the cluster’s health by reducing load if necessary, and verify the configuration settings. Also, consider increasing the ‘discovery.zen.ping_timeout’ and ‘discovery.zen.fd.ping_retries’ settings to allow more time for the master to respond.
This guide will help you check for common problems that cause the log ” exception thrown by listener while notifying no longer master from [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: cluster and master.
Log Context
Log “exception thrown by listener while notifying no longer master from [{}]” classname is InternalClusterService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :
Override public void onNoLongerMaster(String source) { try { listener.onNoLongerMaster(source); } catch (Exception e) { logger.error("exception thrown by listener while notifying no longer master from [{}]"; e; source); } } Override public void clusterStateProcessed(String source; ClusterState oldState; ClusterState newState) {