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)
ELASTIC_PASSWORD=a123456
# Password for the 'kibana_system' user (at least 6 characters)
KIBANA_PASSWORD=a123456
# Version of Elastic products
STACK_VERSION=8.8.0
# Set the cluster name
CLUSTER_NAME=docker-cluster
# Set to 'basic' or 'trial' to automatically start the 30-day trial
LICENSE=basic
#LICENSE=trial
# Port to expose Elasticsearch HTTP API to the host
ES_PORT=9200
#ES_PORT=127.0.0.1:9200
# Port to expose Kibana to the host
KIBANA_PORT=5601
#KIBANA_PORT=80
# Increase or decrease based on the available host memory (in bytes)
MEM_LIMIT=1073741824
# Project namespace (defaults to the current folder name if not set)
#COMPOSE_PROJECT_NAME=myproject
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