Path.repo cannot be supported in es 2.1.0?


Hi. I want to use snapshot in es 2.1.0.
But after I wrote the below setting in elasticsearch.yml as the way of es 1.7.2, es cannot be started.
Is the setting wrong? Coule anyone tell me how to config? Thanks a lot.

in elasticsearch.yml:
path.repo: ["/tmp/backups"]

the error:
[hadoop@Hadoop elasticsearch-2.1.0]$ bin/elasticsearch
Exception in thread "main" SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: ElasticsearchParseException[malformed, expected end of settings but encountered additional content starting at line number: [39], column number: [1]]; nested: ParserException[expected '', but found BlockMappingStart
in 'reader', line 39, column 1:
path.repo: ["/tmp/backups"]
Likely root cause: expected '', but found BlockMappingStart
in 'reader', line 39, column 1:
path.repo: ["/tmp/backups"]

    at com.fasterxml.jackson.dataformat.yaml.snakeyaml.parser.ParserImpl$ParseDocumentStart.produce(
    at com.fasterxml.jackson.dataformat.yaml.snakeyaml.parser.ParserImpl.peekEvent(
    at com.fasterxml.jackson.dataformat.yaml.snakeyaml.parser.ParserImpl.getEvent(
    at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(
    at org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(
    at org.elasticsearch.common.settings.loader.XContentSettingsLoader.load(
    at org.elasticsearch.common.settings.loader.XContentSettingsLoader.load(
    at org.elasticsearch.common.settings.loader.YamlSettingsLoader.load(
    at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(
    at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(
    at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareEnvironment(
    at org.elasticsearch.common.cli.CliTool.<init>(
    at org.elasticsearch.common.cli.CliTool.<init>(
    at org.elasticsearch.bootstrap.BootstrapCLIParser.<init>(
    at org.elasticsearch.bootstrap.Bootstrap.init(
    at org.elasticsearch.bootstrap.Elasticsearch.main(

Refer to the log for complete error details.

(Jakob Reiter) #2

Hi Benny,

this looks like a yaml error, sometimes this is caused by an earlier setting starting with a space or something.
Can you please attach the whole elasticsearch.yml file?
I tried path.repo: ["/tmp/backups"] and do not get this error, it just works.

Just a note about using /tmp, many distros mount it in your RAM using tmpfs, so space is limited and ephemeral.



Sorry for replying late. I‘ve found my mistake.
Before the setting text, there should be a whitespace!

(system) #4