Hi all!
I have a big problem when I try to setup filebeat or metricbeat…
I recieve this message: Exiting: Couldn't connect to any of the configured Elasticsearch hosts. Errors: [Error connection to Elasticsearch https://localhost:9200: Connection marked as failed because the onConnect callback failed: cannot retrieve the elasticsearch license: error from server, response code: 500]
In the elasticsearch logs I found this:
[2019-05-08T17:00:33,129][ERROR][c.a.o.s.f.OpenDistroSecurityFilter] [EV--xse] Unexpected exception [_xpack] InvalidIndexNameException[Invalid index name [_xpack], must not start with '_'.]
org.elasticsearch.indices.InvalidIndexNameException: Invalid index name [_xpack], must not start with '_'.
Are you using the OSS versions of the Beats agents (not the commercial ones)? They recently added a license check that makes the default downloaded beats agents non-compatible with the OSS version of Elasticsearch.
[2019-05-09T08:01:21,378][ERROR][c.a.o.s.f.OpenDistroSecurityFilter] [EV--xse] Unexpected exception [_xpack] InvalidIndexNameException[Invalid index name [_xpack], must not start with '_'.]
org.elasticsearch.indices.InvalidIndexNameException: Invalid index name [_xpack], must not start with '_'.
It turns out that starting in one of the 7.x versions they turned on index lifecycle management checks by default. ILM (index lifecycle management) is an X-Pack feature, so turning this on by default means that Filebeat will do an X-Pack check by default.
This can be fixed by adding setup.ilm.enabled: false to the Filebeat configuration. So, not a bug per se in the OSS Docker build.