Watcher did not stop properly so cannot start up again – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-6.8

Briefly, this error occurs when Elasticsearch’s watcher feature fails to shut down correctly, preventing it from starting up again. This could be due to a variety of reasons such as system crashes, abrupt shutdowns, or internal bugs. To resolve this issue, you can try restarting the Elasticsearch service, ensuring a proper shutdown process, or checking for any bugs in the system. If the problem persists, consider reconfiguring or reinstalling the watcher feature. Always ensure to back up your data before making any significant changes.

This guide will help you check for common problems that cause the log ” watcher did not stop properly; so cannot start up again ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, upgrade.

Log Context

Log “watcher did not stop properly; so cannot start up again” class name is Upgrade.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 boolean watcherStoppedOnAllNodes = r.getNodes().stream()
 .map(WatcherStatsResponse.Node::getWatcherState)
 .allMatch(s -> s == WatcherState.STOPPED);
 if (watcherStoppedOnAllNodes == false) {
 if (currentCount >= 10) {
 listener.onFailure(new ElasticsearchException("watcher did not stop properly; so cannot start up again"));
 } else {
 Thread.sleep(currentCount * 150);
 watcherClient.prepareWatcherStats().execute(waitingStatsListener(currentCount + 1; listener; watcherClient));
 }
 } else {

 

 [ratemypost]