ElasticsearchParseException[malformed, expected settings to start with ‘object’, instead was [VALUE_STRING]]
修改es配置文件的时候,因为没有在“:”号后面留空格,导致报以下错误
Exception in thread "main" SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: ElasticsearchParseException[malformed, expected settings to start with 'object', instead was [VALUE_STRING]];
Likely root cause: ElasticsearchParseException[malformed, expected settings to start with 'object', instead was [VALUE_STRING]]
at org.elasticsearch.common.settings.loader.XContentSettingsLoader.load(XContentSettingsLoader.java:65)
at org.elasticsearch.common.settings.loader.XContentSettingsLoader.load(XContentSettingsLoader.java:45)
at org.elasticsearch.common.settings.loader.YamlSettingsLoader.load(YamlSettingsLoader.java:46)
at org.elasticsearch.common.settings.SettingsBuilder.loadFromStream(Settings.java:1080)
at org.elasticsearch.common.settings.SettingsBuilder.loadFromPath(Settings.java:1067)
at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:88)
at org.elasticsearch.common.cli.CliTool.<init>(CliTool.java:107)
at org.elasticsearch.common.cli.CliTool.<init>(CliTool.java:100)
at org.elasticsearch.bootstrap.BootstrapCLIParser.<init>(BootstrapCLIParser.java:48)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:242)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:45)
Refer to the log for complete error details.
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-nzertxLs-1571217421247)(C:\Users\w1388\AppData\Roaming\Typora\typora-user-images\1551843436218.png)]
elasticsearch.yml
比如应该这样写
cluster.name: bigdata
不应这样
cluster.name:bigdata
解决办法:
将所有的 : 后面加上空格