Kibana in a Docker Container not Responding

I’ve been experimenting lately with the Elastic Stack, Elasticsearch, Logstash, and Kibana, from Elastic, for a few weeks now. I ran into a problem with Kibana running away and becoming unresponsive, so I decided to give it a try running the three in Docker containers.

There is another little gotcha to watch out for. If you want the Docker containers to run in the background, which undoubtedly you do want, then you need to add the -d (-d = detach) switch to the command:

sudo docker run -d docker.elastic.co/kibana/kibana:6.6.1

If you’ve tried to follow the docs, and aren’t very familiar with Docker, you might have run into an issue where once everything is up and running, if you open a browser and go to http://<your_elastic_host>:5601 to access Kibana, you’re confronted with an error to the effect of “The page is not reachable”

If you list the running docker containers, you should see output similar to the following:

The -p 9200:9200 and -p 9300:9300 assign the Elasticsearch Docker container ports 9200 and 9300 to the physical ports 9200 and 9300 respectively. You can see it in the sudo docker container ps output above. Notice that it’s missing from the Kibana container?

To fix this, issue the following commands (replace <container_id> with the actual container ID):