Connection failed to Elasticsearch: failed to authenticate user

Hi there,

After installing x-pack for Elasticsearch 6.1 and Logstash and even for Kibana, I'm facing some new problems.

I cannot get connected to Elasticsearch.

The error generated:

[2018-01-23T11:46:54,606][INFO ][o.e.x.s.a.AuthenticationService] [uha1hg-] Authentication of [elastic] was terminated by realm [reserved] - failed to authenticate user [elastic]

I tried to enter the password using this command:

curl -u elastic -XGET 'http://localhost:9200/_cat/health?v'

and it generates a connection refused error.

PS: I'm sure of the password

May someone helps, please?
Thank's in advance.

Hi @Rym_Guerbi_Michaut

you restarted all nodes of the cluster after install x-pack ?

I moved your question to #x-pack

The mostly likely cause of that error message would be that ES isn't listening on localhost:9200

The reasons for that might be:

  1. Your ES node wasn't running when you tried that command
  2. You're listening on a non-standard port (have you configured http.port ?)
  3. You're listening on a external IP rather than "localhost" (have you configured network.host ?)
  4. You turned off the HTTP interface (have you configured http.enabled ?)

Hi Tim,
ES seems to be actually listening on localhost:9200

Hi Fram,
No, I didn't close the nodes, as I thought that whenever we turn down ES, all the nodes are closed automatically, no?

You need restart all nodes after install and configure x-pack.

Thank's for your help @Fram_Souza, I've uninstalled x-pack, sounds too complicated for me for now...
I may install it later, once I would have a better understanding of ELK :slight_smile:

1 Like

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