Getting "Kibana server is not ready yet" when running from docker

I'm trying to run elasticsearch and kibana via dockers, and I'm getting errors with kibana .

I'm using elasticsearch and kibana version 7.6.2 and Ubuntu 18.04.6 LTS

I run elasticsearch with the following command:

docker run -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.6.2

And it seems that elasticsearch is on (I can bulk documents and get information about the index from python code).

I'm running kibana with the following commands:

 docker network create elastic
 docker run --net elastic -p 127.0.0.1:5601:5601 -e "ELASTICSEARCH_HOSTS=http://127.0.0.1:9200" docker.elastic.co/kibana/kibana:7.6.2

I see the following message in the web browser: Kibana server is not ready yet And I see the following logs in the console:

{"type":"log","@timestamp":"2022-05-22T06:45:20Z","tags":["info","savedobjects-service"],"pid":7,"message":"Waiting until all Elasticsearch nodes are compatible with Kibana before starting saved objects migrations..."}
{"type":"log","@timestamp":"2022-05-22T06:45:20Z","tags":["error","elasticsearch","data"],"pid":7,"message":"Request error, retrying\nHEAD http://127.0.0.1:9200/.apm-agent-configuration => connect ECONNREFUSED 127.0.0.1:9200"}
{"type":"log","@timestamp":"2022-05-22T06:45:20Z","tags":["error","elasticsearch","data"],"pid":7,"message":"Request error, retrying\nGET http://127.0.0.1:9200/_xpack => connect ECONNREFUSED 127.0.0.1:9200"}
{"type":"log","@timestamp":"2022-05-22T06:45:20Z","tags":["error","elasticsearch","admin"],"pid":7,"message":"Request error, retrying\nGET http://127.0.0.1:9200/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip => connect ECONNREFUSED 127.0.0.1:9200"}
{"type":"log","@timestamp":"2022-05-22T06:45:20Z","tags":["warning","elasticsearch","data"],"pid":7,"message":"Unable to revive connection: http://127.0.0.1:9200/"}
{"type":"log","@timestamp":"2022-05-22T06:45:20Z","tags":["warning","elasticsearch","data"],"pid":7,"message":"No living connections"}
Could not create APM Agent configuration: No Living connections
{"type":"log","@timestamp":"2022-05-22T06:45:20Z","tags":["warning","elasticsearch","data"],"pid":7,"message":"Unable to revive connection: http://127.0.0.1:9200/"}
{"type":"log","@timestamp":"2022-05-22T06:45:20Z","tags":["warning","elasticsearch","data"],"pid":7,"message":"No living connections"}

How can I run kibana via docker ?

Hi @asil

can you add this environment server.host=0 when running kibana docker .

Is Elasticsearch available, up and running? Check by curl, if is possible.

Same results.
I run kibana with:
docker run --net elastic -p 127.0.0.1:5601:5601 -e "server.host=0" -e "ELASTICSEARCH_HOSTS=http://127.0.0.1:9200" docker.elastic.co/kibana/kibana:7.6.2
And got same results:

"type":"log","@timestamp":"2022-05-23T08:48:21Z","tags":["warning","plugins","licensing"],"pid":8,"message":"License information could not be obtained from Elasticsearch due to Error: No Living connections error"}
{"type":"log","@timestamp":"2022-05-23T08:48:21Z","tags":["warning","elasticsearch","admin"],"pid":8,"message":"Unable to revive connection: http://127.0.0.1:9200/"}

Hi @asil as @Rios mentioned, ES is running?

curl -XGET http://localhost:9200

Elastic is running (I can work with it via python code)

I had similar issues. Kibana cannot see own system indices or they were corrupted, and ES what up. Have you tried to restart ES? Is it possible?

I have tried to restart ES - > got same error message

Is elasticsearch running in the same docker container as Kibana? This configuration will make Kibana try to connect to an elasticsearch instance running in the same container, it won't work if elasticsearch is running in a different container.

You should use docker-compose, check the documentation for version 7.X.

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