Watcher service stopped – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 8.4-8.9

Briefly, this error occurs when the Elasticsearch Watcher service, which is responsible for alerting and monitoring, is halted due to reasons like configuration issues, insufficient resources, or an unexpected error. To resolve this, you can restart the Watcher service. If the problem persists, check the Elasticsearch logs for any specific errors. Ensure that the Elasticsearch cluster has sufficient resources and the Watcher service is properly configured. If the issue is due to an unexpected error, you may need to debug the code or contact Elasticsearch support.

This guide will help you check for common problems that cause the log ” watcher service stopped ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: .

Log Context

Log “watcher service stopped” classname is AbstractFileWatchingService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

            } finally {
                watcherThread = null;
                settingsDirWatchKey = null;
                configDirWatchKey = null;
                watchService = null;
                logger.info("watcher service stopped");
            }
        } else {
            logger.trace("file watch service already stopped");
        }
    }

 

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?