Creating template with version – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.17-7.17

Briefly, this error occurs when there is an attempt to create an index template in Elasticsearch with a version that is not compatible with the current Elasticsearch version. This could be due to a mismatch between the Elasticsearch client version and the server version. To resolve this issue, you can either upgrade your Elasticsearch server to match the client version or downgrade your client to match the server version. Alternatively, you can modify the template to be compatible with the current Elasticsearch version.

This guide will help you check for common problems that cause the log ” creating template [{}] with version [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: template, plugin, version.

Log Context

Log “creating template [{}] with version [{}]” classname is Monitoring.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                try (
                    XContentParser parser = XContentType.JSON.xContent()
                        .createParser(NamedXContentRegistry.EMPTY; DeprecationHandler.THROW_UNSUPPORTED_OPERATION; templateSource)
                ) {
                    IndexTemplateMetadata updatedTemplate = IndexTemplateMetadata.Builder.fromXContent(parser; templateName);
                    logger.info("creating template [{}] with version [{}]"; templateName; MonitoringTemplateUtils.TEMPLATE_VERSION);
                    createdTemplates.add(updatedTemplate);
                } catch (IOException e) {
                    logger.error("unable to create template [" + templateName + "]"; e);
                }
                // Loading a template involves IO to some specific locations; looking for files with set names.

 

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?