Cannot reach kibana in docker


I assume it is some stupid little error, but I cannot reach my kibana running in a docker container. (i am quite new to docker, but I like it so far :wink: )

I took following image:

docker ps shows me the following:

CONTAINER ID        IMAGE                                       COMMAND                  CREATED             STATUS              PORTS                     NAMES
fb97e3925da3       "/bin/bash /usr/loca…"   About an hour ago   Up 21 minutes>5601/tcp   kibana
e087cf628a3a   "/usr/local/bin/dock…"   About an hour ago   Up About an hour    5044/tcp, 9600/tcp        logstash_ingest_1
cf3f150d5e1d        redis                                       "docker-entrypoint.s…"   8 days ago          Up 6 days >6379/tcp    redis

Inside the docker container it seems fine:

bash-4.2$ curl localhost:5601
<script>var hashRoute = '/kibana-TSI/app/kibana';
var defaultRoute = '/kibana-TSI/app/kibana';

var hash = window.location.hash;
if (hash.length) {
  window.location = hashRoute + hash;
} else {
  window.location = defaultRoute;

When I want to connect from the host this happens:

[root@server ~]$ curl localhost:15601
curl: (56) Recv failure: Connection reset by peer
[root@server ~]$ curl
curl: (7) Failed connect to; Connection refused

I am creating the container with following script:


sudo docker run \
-d \
--cpus=$CPU_LIMIT \
--init \
--name kibana \
--hostname kibana \
-p$HOST_PORT:5601 \

my effective kibana.yml wihtout comments looks like that:

server.port: 5601
server.basePath: "/kibana-TSI"
elasticsearch.url: ""
elasticsearch.requestTimeout: 60000 false

Any help is appreciated.
Thanks in Advance, Andreas

Am not too sure of the docker config. Let me ping my colleague @jarpy who might shed more light on this when he has some time.



You'll want to set in your kibana.yml. If you don't, Kibana will default to only binding to localhost. The important part to that is that the container is its own "localhost", so the default value will only allow Kibana to be seen from inside the container, which is clearly not what you want.

That's why, in the default config, we set to 0 (shortcut for

oh great. Thanks, now it works like charme.

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