问答详情
源自:2-4 分布式安装

windows下修改elasticsearch.yml后报错,冒号之后加了空格!这是什么问题呢

SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: JsonParseException[Duplicate field 'network.host'

 at [Source: sun.nio.ch.ChannelInputStream@dd0c991; line: 97, column: 13]];

        at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1097)

        at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1070)

        at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:83)

        at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:95)

        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)

        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)

        at org.elasticsearch.cli.Command.main(Command.java:90)

        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)

        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)

Caused by: com.fasterxml.jackson.core.JsonParseException: Duplicate field 'network.host'

 at [Source: sun.nio.ch.ChannelInputStream@dd0c991; line: 97, column: 13]

        at com.fasterxml.jackson.core.json.JsonReadContext._checkDup(JsonReadContext.java:204)

        at com.fasterxml.jackson.core.json.JsonReadContext.setCurrentName(JsonReadContext.java:198)

        at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:372)

        at org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:52)

        at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:645)

        at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:620)

        at org.elasticsearch.common.settings.Settings.access$400(Settings.java:82)

        at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1093)

        ... 8 more

这是我的elasticsearch.yml  master配置

http.cors.enabled: true

http.cors.allow-origin: "*"


cluster.name: kiwi

node.name: master

node.master: true


network.host: 127.0.0.1


提问者:weixin_慕妹8276518 2019-07-08 16:10

个回答

  • qq_Cryonmyshoul_03778284
    2019-08-15 21:52:11

    冒号后面是需要有一个空格,每一行前面是不需要空格

  • weixin_慕妹8276518
    2019-07-08 16:27:01

    重新解压一次还是这种配置问题解决?