Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ElasticsearchParseException: malformed, expected settings to start with 'object', instead was [VALUE_STRING]

I got following exception while starting elastic search server

Exception in thread "main" org.elasticsearch.common.settings.SettingsException: Failed to load settings from [file:/usr/local/elasticsearch-1.7.1/config/elasticsearch.yml]
        at org.elasticsearch.common.settings.ImmutableSettings$Builder.loadFromStream(ImmutableSettings.java:985)
        at org.elasticsearch.common.settings.ImmutableSettings$Builder.loadFromUrl(ImmutableSettings.java:969)
        at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareSettings(InternalSettingsPreparer.java:95)
        at org.elasticsearch.plugins.PluginManager.main(PluginManager.java:396)
Caused by: org.elasticsearch.ElasticsearchParseException: malformed, expected settings to start with 'object', instead was [VALUE_STRING]
        at org.elasticsearch.common.settings.loader.XContentSettingsLoader.load(XContentSettingsLoader.java:66)
        at org.elasticsearch.common.settings.loader.XContentSettingsLoader.load(XContentSettingsLoader.java:46)
        at org.elasticsearch.common.settings.loader.YamlSettingsLoader.load(YamlSettingsLoader.java:46)
        at org.elasticsearch.common.settings.ImmutableSettings$Builder.loadFromStream(ImmutableSettings.java:982)
        ... 3 more
like image 562
Vijay Kumar Rajput Avatar asked Aug 21 '15 20:08

Vijay Kumar Rajput


1 Answers

I got the issue.

I had updated config/elasticsearch.yml for cluster.name and node.name like below

cluster.name:my_elastic_cluster  
node.name:"EL1_NODE"

But look like parser doesn't like this format. Its need spaces with ":" delimiter

I added one space before and after : and it worked !!!

> cluster.name : my_elastic_cluster  
> node.name : "EL1_NODE"
like image 66
Vijay Kumar Rajput Avatar answered Sep 22 '22 03:09

Vijay Kumar Rajput