Elasticsearch json was deprecated in 5.5.0 and must be converted to elasticsearch yml – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-8.1

Briefly, this error occurs when you’re using an outdated configuration file format, elasticsearch.json, which was deprecated in Elasticsearch version 5.5.0. Elasticsearch now uses the .yml (YAML) format for its configuration files. To resolve this issue, you need to convert your existing elasticsearch.json file to elasticsearch.yml. This involves translating the JSON syntax into YAML syntax. Be careful with indentation, as YAML requires proper indentation for structure. After conversion, replace the old .json file with the new .yml file in the config directory.

This guide will help you check for common problems that cause the log ” elasticsearch.json was deprecated in 5.5.0 and must be converted to elasticsearch.yml ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: node.

Log Context

Log “elasticsearch.json was deprecated in 5.5.0 and must be converted to elasticsearch.yml” class name is InternalSettingsPreparer.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 if (Files.exists(environment.configFile().resolve("elasticsearch.yaml"))) {
 throw new SettingsException("elasticsearch.yaml was deprecated in 5.5.0 and must be renamed to elasticsearch.yml");
 }  if (Files.exists(environment.configFile().resolve("elasticsearch.json"))) {
 throw new SettingsException("elasticsearch.json was deprecated in 5.5.0 and must be converted to elasticsearch.yml");
 }  output = Settings.builder(); // start with a fresh output
 Path path = environment.configFile().resolve("elasticsearch.yml");
 if (Files.exists(path)) {

 

 [ratemypost]