I install Elasticsearch and Kibana following the Official document: Install Kibana with Docker | Kibana Guide [8.9] | Elastic
the command is:
docker pull docker.elastic.co/elasticsearch/elasticsearch:8.9.1
docker pull docker.elastic.co/kibana/kibana:8.9.1
docker network create elastic
docker run -it \
--name es89101 \
--net elastic \
--restart=always \
-v /home/username/elasticsearch/plugins:/usr/share/elasticsearch/plugins \
-v /home/username/elasticsearch/data:/usr/share/elasticsearch/data \
-p 9200:9200 \
-p 9300:9300 \
docker.elastic.co/elasticsearch/elasticsearch:8.9.1
docker run -it \
--name kib89101 \
--net elastic \
--restart=always \
-p 5601:5601 \
docker.elastic.co/kibana/kibana:8.9.1
every thing is OK:
When Kibana is starting, I paste the token, but it "Completing setup" for a long time,
until i refreshed my browser.
Then I input elastic's password, entered kibana.
That's looks ok
But when I restarted my server, es89101 and kib89101 is restarted correctly, I can access 9200 port, but when i enter kibana, 5601 port, browser print "Kibana server is not ready yet"
I checked Kibana's log whith command:
docker logs kib89101
it prints
[2023-08-22T19:00:51.807+00:00][ERROR][elasticsearch-service] Unable to retrieve version information from Elasticsearch nodes. connect ECONNREFUSED 172.18.0.2:9200
I don't know why
I've tried several times and got the same result.
my docker version is
[root@cs8 ~]# docker version
Client: Docker Engine - Community
Version: 24.0.1
API version: 1.43
Go version: go1.20.4
Git commit: 6802122
Built: Fri May 19 18:04:11 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 24.0.1
API version: 1.43 (minimum version 1.12)
Go version: go1.20.4
Git commit: 463850e
Built: Fri May 19 18:03:12 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.21
GitCommit: 3dce8eb055cbb6872793272b4f20ed16117344f8
runc:
Version: 1.1.7
GitCommit: v1.1.7-0-g860f061
docker-init:
Version: 0.19.0
GitCommit: de40ad0
[root@cs8 ~]#