Briefly, this error occurs when the Elasticsearch Watcher, a tool for alerting and monitoring, is halted due to reasons like insufficient resources, configuration issues, or a problem with the Elasticsearch cluster. To resolve this, you can restart the Watcher, ensure there are enough resources (CPU, memory), check the Watcher and Elasticsearch configurations for any inconsistencies, or troubleshoot the Elasticsearch cluster to identify and fix any issues.
This guide will help you check for common problems that cause the log ” watcher has stopped ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.
Log Context
Log “watcher has stopped” classname is WatcherLifeCycleService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :
// waiting to set state to stopped until after all currently running watches are finished watcherService.stop("watcher manually marked to shutdown by cluster state update"; () -> { // only transition from stopping -> stopped (which may not be the case if restarted quickly) boolean stopped = state.compareAndSet(WatcherState.STOPPING; WatcherState.STOPPED); if (stopped) { logger.info("watcher has stopped"); } else { logger.info("watcher has not been stopped. not currently in a stopping state; current state [{}]"; state.get()); } });
[ratemypost]