[
https://issues.apache.org/jira/browse/METRON-897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15986668#comment-15986668
]
Nick Allen commented on METRON-897:
-----------------------------------
To fix this, I needed to add brackets around the `network_host` parameter in
the Ambari configuration settings for Elasticsearch.
By default the settings get deployed to look something like
"_lo:ipv4_","_eth0:ipv4_". I needed to edit this to be
["_lo:ipv4_","_eth0:ipv4_"] so that the elasticsearch.yml file was actually
valid YAML when deployed by Ambari onto the host running Elasticsearch.
Also, the help tool tip did not mention the brackets.
> Failed to Start Elasticsearch Deployed with MPack - SettingsException
> ---------------------------------------------------------------------
>
> Key: METRON-897
> URL: https://issues.apache.org/jira/browse/METRON-897
> Project: Metron
> Issue Type: Bug
> Reporter: Nick Allen
>
> {code}
> SettingsException[Failed to load settings from [elasticsearch.yml]]
> {code}
> When deploying Elasticsearch with the Ambari MPack, it fails to start. This
> is in an environment with 1 master node and 2 data nodes all running on 3
> separate hosts. The exception is this.
> {code}
> Apr 26 16:45:41 y113 systemd: Starting Elasticsearch...
> Apr 26 16:45:41 y113 systemd: Started Elasticsearch.
> Apr 26 16:45:41 y113 elasticsearch: Exception in thread "main"
> SettingsException[Failed to load settings from [elasticsearch.yml]]; nested:
> ParserException[while parsing a block mapping
> Apr 26 16:45:41 y113 elasticsearch: in 'reader', line 2, column 1:
> Apr 26 16:45:41 y113 elasticsearch: cluster:
> Apr 26 16:45:41 y113 elasticsearch: ^
> Apr 26 16:45:41 y113 elasticsearch: expected <block end>, but found FlowEntry
> Apr 26 16:45:41 y113 elasticsearch: in 'reader', line 67, column 26:
> Apr 26 16:45:41 y113 elasticsearch: network.host: "_lo:ipv4_","_eth0:ipv4_"
> Apr 26 16:45:41 y113 elasticsearch: ^
> Apr 26 16:45:41 y113 elasticsearch: ];
> Apr 26 16:45:41 y113 elasticsearch: Likely root cause: while parsing a block
> mapping
> Apr 26 16:45:41 y113 elasticsearch: in 'reader', line 2, column 1:
> Apr 26 16:45:41 y113 elasticsearch: cluster:
> Apr 26 16:45:41 y113 elasticsearch: ^
> Apr 26 16:45:41 y113 elasticsearch: expected <block end>, but found FlowEntry
> Apr 26 16:45:41 y113 elasticsearch: in 'reader', line 67, column 26:
> Apr 26 16:45:41 y113 elasticsearch: network.host: "_lo:ipv4_","_eth0:ipv4_"
> Apr 26 16:45:41 y113 elasticsearch: ^
> Apr 26 16:45:41 y113 elasticsearch: at
> com.fasterxml.jackson.dataformat.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:570)
> Apr 26 16:45:41 y113 elasticsearch: at
> com.fasterxml.jackson.dataformat.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158)
> Apr 26 16:45:41 y113 elasticsearch: at
> com.fasterxml.jackson.dataformat.yaml.snakeyaml.parser.ParserImpl.getEvent(ParserImpl.java:168)
> Apr 26 16:45:41 y113 elasticsearch: at
> com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:342)
> Apr 26 16:45:41 y113 elasticsearch: at
> org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:53)
> Apr 26 16:45:41 y113 elasticsearch: at
> org.elasticsearch.common.settings.loader.XContentSettingsLoader.serializeObject(XContentSettingsLoader.java:99)
> Apr 26 16:45:41 y113 elasticsearch: at
> org.elasticsearch.common.settings.loader.XContentSettingsLoader.load(XContentSettingsLoader.java:67)
> Apr 26 16:45:41 y113 elasticsearch: at
> org.elasticsearch.common.settings.loader.XContentSettingsLoader.load(XContentSettingsLoader.java:45)
> Apr 26 16:45:41 y113 elasticsearch: at
> org.elasticsearch.common.settings.loader.YamlSettingsLoader.load(YamlSettingsLoader.java:46)
> Apr 26 16:45:41 y113 elasticsearch: at
> org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1080)
> Apr 26 16:45:41 y113 elasticsearch: at
> org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1067)
> Apr 26 16:45:41 y113 elasticsearch: at
> org.elasticsearch.node.internal.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:88)
> Apr 26 16:45:41 y113 elasticsearch: at
> org.elasticsearch.bootstrap.Bootstrap.initialSettings(Bootstrap.java:202)
> Apr 26 16:45:41 y113 elasticsearch: at
> org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:241)
> Apr 26 16:45:41 y113 elasticsearch: at
> org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
> Apr 26 16:45:41 y113 elasticsearch: Refer to the log for complete error
> details.
> Apr 26 16:45:41 y113 systemd: elasticsearch.service: main process exited,
> code=exited, status=1/FAILURE
> Apr 26 16:45:41 y113 systemd: Unit elasticsearch.service entered failed state.
> Apr 26 16:45:41 y113 systemd: elasticsearch.service failed.
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)