Failed to setup APM - yaml: line 159: did not find expected key


I have failed to setup APM.

./apm-server setup
Exiting: error loading config file: yaml: line 159: did not find expected key

The following is the yml file:
hosts: [":9200"]
username: "elastic"
password: "password"

The following executed ok:
curl -XGET 'http://:9200/_all/_search?q=*&pretty' -u elastic:password

Please guide me for any recommendation. Thanks.


I'm not familiar with this specific error, but it sounds like there's a problem with the YAML formatting, perhaps to do with whitespace.

Can you please either paste the config as pre-formatted text (use the "</>" formatting option in Discuss), or paste it into or a similar service.

Hi axw,

I think the problem is I am not using X-Pack secured version of Elastic Stack. I just removed the settings.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.