X-Pack Kibana failed to authenticate user

Hello, i installed elasticsearch a few days ago.
First i installed elasticsearch, then kibana and x-pack for both. I also changed the elasticsearch.username in kibana.yml. I hope that someone can help me. It worked without x-pack, but now i can only start elastic.

Kibana :
log [13:10:36.001] [error][status][plugin:tilemap@6.1.2] Status changed from red to red - [security_exception] failed to authenticate user [kibana], with { header={ WWW-Authenticate="Basic realm="security" charset="UTF-8"" } }

log [13:11:36.235] [warning][license][xpack] License information from the X-Pack plugin could not be obtained from Elasticsearch for the [data] cluster. [security_exception] failed to authenticate user [kibana], with { header={ WWW-Authenticate="Basic realm="security" charset="UTF-8"" } } :: {"path":"/_xpack","statusCode":401,"response":"{"error":{"root_cause":[{"type":"security_exception","reason":"failed to authenticate user [kibana]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"failed to authenticate user [kibana]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}","wwwAuthenticateDirective":"Basic realm="security" charset="UTF-8""}

Hi,

  • Did you restart Elasticsearch after installing X-Pack ?
  • Did you set the passwords for the built-in users as described in the docs ?
  • You mention elasticsearch.username but did you also set the elasticsearch.password in kibana.yml ? ( Assuming you have completed the aforementioned step after installing X-Pack )
1 Like

Hi, i set the passwords and i also set the username and password in kibana.yml, but it still doesn't work. :confused:

It sounds like that you are using the wrong password. Did you set the password yourself or did you get auto-generated passwords from setup-passwords ?

You can test the passwords you think are correct against elasticsearch manually by running

curl -u <user_here> 'http://localhost:9200/_xpack/security/_authenticate?pretty'

replacing <user_here> with the relevant username ( elastic, kibana, logstash_system ) and entering the appropriate password for each.

If you can't remember or are not sure which passwords were generated or what you have set, you can always reset the password of the builtin users manually using the instructions that @timv has shared in a previous answer

3 Likes

Thank you! It works now :slight_smile:

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