Error adding watcher template request was not acknowledged – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-7.1

Briefly, this error occurs when Elasticsearch fails to acknowledge the addition of a watcher template. This could be due to a variety of reasons such as network issues, incorrect template format, or insufficient permissions. To resolve this, you can try the following: 1) Check your network connection and ensure Elasticsearch is running properly. 2) Verify the format of your watcher template and ensure it adheres to the correct syntax. 3) Check your user permissions to ensure you have the necessary rights to add a watcher template.

In addition we recommend you run the Elasticsearch Template Optimizer to fix problems in your data modeling.

It will analyze your templates to detect issues and improve search performance, reduce indexing bottlenecks and optimize storage utilization. The Template Optimizer is free and requires no installation.

Log Context

Log “Error adding watcher template [{}]; request was not acknowledged” classname is WatcherIndexTemplateRegistry.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                    new ActionListener() {
                        @Override
                        public void onResponse(AcknowledgedResponse response) {
                            creationCheck.set(false);
                            if (response.isAcknowledged() == false) {
                                logger.error("Error adding watcher template [{}]; request was not acknowledged"; templateName);
                            }
                        }

                        @Override
                        public void onFailure(Exception e) {

 

 [ratemypost]