Docker-compose instructions lead to "unable to authenticate user [elastic]"

This post was flagged by the community and is temporarily hidden.

More importantly it should have got rid of the volume mounts...

Do you have disk space issues?

Clean up and try this,

create a file


version: '3'
    container_name: es01
    # 8.x
    environment: ['CLI_JAVA_OPTS=-Xms2g -Xmx2g','bootstrap.memory_lock=true','discovery.type=single-node','', '']
      - 9200:9200
      - elastic
        soft: -1
        hard: -1
        soft: 65536
        hard: 65536

    container_name: kib01
      XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY: alskdjfhlaskj-c4d3-4a0a-8290-2abcb83ab3aa
      - 5601:5601
      - elastic


$ TAG=8.7.1 docker-compose -f es-kb-no-sec-compose.yml up

This should bring up a Kibana and Elastic with no security... to just check your docker version and everything....

As per our DMs, this version works totally fine and is fit for my purposes at least, thanks again.

1 Like

hello @dadoonet !!can you give me a docker compose file for implementing passwords in elasticsearch and kibana version 8.7.1 , because with 8.7.1 version passwords are not working please can someone help me out because it's on priority

Hi @Hrithik_Hiranwar Welcome to the community!

1st please do not directly @ mention people that you are not already in a conversation with, it is not a best practice of the forum.

Have you looked at our official documentation that was linked in the very first post ! :slight_smile:

That is the official guide. See Here

And when you say not working you need to provide more information like the the original poster...

What is the Problem? What is the configuration? What are the logs etc... otherwise we can not help.

Just to triple check I just used the documentation and used the exact instruction and sample docker compose file and it worked perfectly...give it a try!

1 Like

I had the same problem on Linux. But the same config on my Mac can run successfully. I feel it's very strange and don't down how to solve it.

[2023-06-05T06:44:51.641+00:00][ERROR][elasticsearch-service] Unable to retrieve version information from Elasticsearch nodes. security_exception
	Root causes:
		security_exception: unable to authenticate user [kibana_system] for REST request [/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip]
[2023-06-05T06:44:52.611+00:00][INFO ][plugins.screenshotting.chromium] Browser executable: /usr/share/kibana/x-pack/plugins/screenshotting/chromium/headless_shell-linux_x64/headless_shell

I have solved this problem. I found that the password for kibana_system was not set successful.

# Password for the 'elastic' user (at least 6 characters)

# Password for the 'kibana_system' user (at least 6 characters)

# Version of Elastic products

# Set the cluster name

# Set to 'basic' or 'trial' to automatically start the 30-day trial

# Port to expose Elasticsearch HTTP API to the host

# Port to expose Kibana to the host

# Increase or decrease based on the available host memory (in bytes)

# Project namespace (defaults to the current folder name if not set)

In kibana container, I execute the following command:

curl -u kibana_system:a123456 https://es01:9200/ --insecure

And the result is this:

{"error":{"root_cause":[{"type":"security_exception","reason":"unable to authenticate user [kibana_system] for REST request [/]","header":{"WWW-Authenticate":["Basic realm=\"security\" charset=\"UTF-8\"","Bearer realm=\"security\"","ApiKey"]}}],"type":"security_exception","reason":"unable to authenticate user [kibana_system] for REST request [/]","header":{"WWW-Auth

I switched to the elastic user can access successfully.

curl -u elastic:a123456 https://es01:9200/ --insecure
  "name" : "es01",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "khglIsTqQuSztlJopcuahQ",
  "version" : {
    "number" : "8.0.0",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "1b6a7ece17463df5ff54a3e1302d825889aa1161",
    "build_date" : "2022-02-03T16:47:57.507843096Z",
    "build_snapshot" : false,
    "lucene_version" : "9.0.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  "tagline" : "You Know, for Search"

So my solution was to reset kibana_system password manually.

docker exec -it docker-elk-es01-1 /bin/bash

# reset kibana_system password
elasticsearch-reset-password -u kibana_system -i

# typed your password

Exit container and restart kibana

docker compose restart kibana

Wait a minute, The kibana service started successfully

1 Like

Thanks a lot for sharing your detailed solution to solve this!

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