I followed the accepted answer here How to use the official docker elasticsearch container?
but the kibana UI is not coming up in the browser localhost:5601, what could be the problem?
[root@localhost ~]# sysctl -w vm.max_map_count=262144
vm.max_map_count = 262144
[root@localhost ~]# cat /proc/sys/vm/max_map_count
262144
[root@localhost ~]#
error log: docker-compose up
kibana | {"type":"log","@timestamp":"2020-05-28T02:09:53Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://elasticsearch:9200/"}
kibana | {"type":"log","@timestamp":"2020-05-28T02:09:55Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://elasticsearch:9200/"}
kibana | {"type":"log","@timestamp":"2020-05-28T02:09:55Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}
docker ps :
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b978841f86d5 docker.elastic.co/elasticsearch/elasticsearch:6.6.1 "/bin/bash bin/es-do…" 14 minutes ago Up 31 seconds 0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp elasticsearch
9f255a223659 docker.elastic.co/kibana/kibana:6.6.1 "/bin/sh -c /usr/loc…" 14 minutes ago Up 31 seconds 0.0.0.0:5601->5601/tcp kibana
c21d1a77f25f mobz/elasticsearch-head:5 "/bin/sh -c 'grunt s…" 14 minutes ago Up 31 seconds 0.0.0.0:9100->9100/tcp head
OS: Centos 7
docker: latest
docker-compose: latest
docker-compose.yml
version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.6.1
container_name: elasticsearch
environment:
- node.name=es01
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
nproc: 65535
memlock:
soft: -1
hard: -1
cap_add:
- ALL
privileged: true
ports:
- 9200:9200
- 9300:9300
networks:
- elastic
kibana:
image: docker.elastic.co/kibana/kibana-oss:6.6.1
container_name: kibana
environment:
SERVER_NAME: localhost
ELASTICSEARCH_URL: http://elasticsearch:9200
depends_on:
- elasticsearch
ports:
- 5601:5601
ulimits:
nproc: 65535
memlock:
soft: -1
hard: -1
cap_add:
- ALL
networks:
- elastic
network:
elastic:
driver: bridge
final capture here after adding the network part (suggested by @Nagle Zhang