`2022-09-05T06:02:19.167802226Z Exception in thread "main" SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: JsonParseException[Duplicate field 'http.host'
2022-09-05T06:02:19.167837191Z at [Source: sun.nio.ch.ChannelInputStream@5dafbe45; line: 2, column: 10]];
2022-09-05T06:02:19.167843482Z at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1097)
2022-09-05T06:02:19.167848561Z at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1070)
2022-09-05T06:02:19.167853373Z at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:83)
2022-09-05T06:02:19.167914321Z at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:95)
2022-09-05T06:02:19.167920046Z at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
2022-09-05T06:02:19.167925311Z at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125)
2022-09-05T06:02:19.167930007Z at org.elasticsearch.cli.Command.main(Command.java:90)
2022-09-05T06:02:19.167934788Z at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
2022-09-05T06:02:19.167939422Z at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
2022-09-05T06:02:19.167944170Z Caused by: com.fasterxml.jackson.core.JsonParseException: Duplicate field 'http.host'
2022-09-05T06:02:19.167948990Z at [Source: sun.nio.ch.ChannelInputStream@5dafbe45; line: 2, column: 10]
2022-09-05T06:02:19.167953954Z at com.fasterxml.jackson.core.json.JsonReadContext._checkDup(JsonReadContext.java:204)
2022-09-05T06:02:19.167958264Z at com.fasterxml.jackson.core.json.JsonReadContext.setCurrentName(JsonReadContext.java:198)
2022-09-05T06:02:19.167962685Z at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:372)
2022-09-05T06:02:19.167970216Z at org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:52)
2022-09-05T06:02:19.167974724Z at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:645)
2022-09-05T06:02:19.167979477Z at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:620)
2022-09-05T06:02:19.167984145Z at org.elasticsearch.common.settings.Settings.access$400(Settings.java:82)
2022-09-05T06:02:19.167988745Z at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1093)
解决办法:删去 elasticsearch.yml 里面的重复属性,并检查格式。