Hello,
I had a docker compose set-up of whole elastic stack and the same is working fine on my dev instance. Once i moved the whole to production server, facing connectivity issues between kibana and elastic search.
Please find the details below:
docker-compose.yml
version: '3.7'
services:
elasticsearch:
build:
context: elasticsearch/
args:
ELK_VERSION: $ELK_VERSION
volumes:
- type: bind
source: ./elasticsearch/config/elasticsearch.yml
target: /usr/share/elasticsearch/config/elasticsearch.yml
read_only: true
- type: volume
source: elasticsearch
target: /usr/share/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"
container_name: elasticsearch
environment:
ES_JAVA_OPTS: "-Xmx2g -Xms2g"
#ES_JAVA_OPTS: "-Des.enforce.bootstrap.checks=true"
discovery.type: single-node
networks:
- elk
logstash:
build:
context: logstash/
args:
ELK_VERSION: $ELK_VERSION
volumes:
- type: bind
source: ./logstash/config/
target: /usr/share/logstash/config/
read_only: true
- type: bind
source: ./logstash/pipeline
target: /usr/share/logstash/pipeline
read_only: true
ports:
- "5000:5000/tcp"
- "5000:5000/udp"
- "9600:9600"
environment:
LS_JAVA_OPTS: "-Xmx256m -Xms256m"
networks:
- elk
depends_on:
- elasticsearch
kibana:
build:
context: kibana/
args:
ELK_VERSION: $ELK_VERSION
volumes:
- type: bind
source: ./kibana/config/kibana.yml
target: /usr/share/kibana/config/kibana.yml
read_only: true
ports:
- "5601:5601"
networks:
- elk
depends_on:
- elasticsearch
networks:
elk:
driver: bridge
volumes:
elasticsearch:
kibana.yml
server.name: kibana
server.host: 0.0.0.0
elasticsearch.hosts: [ "http://elasticsearch:9200" ]
monitoring.ui.container.elasticsearch.enabled: true
elasticsearch.requestTimeout: 120000
elasticsearch.ssl.verificationMode: none
elasticsearch.username: elastic
elasticsearch.password: healthcenter@123
elasticsearch.yml
cluster.name: "docker-cluster"
network.host: 0.0.0.0
xpack.license.self_generated.type: basic
xpack.security.enabled: false
xpack.monitoring.collection.enabled: true
docker-compose logs output:
kibana_1 | {"type":"log","@timestamp":"2020-07-21T08:57:31Z","tags":["warning","elasticsearch","admin"],"pid":6,"message":"Unable to revive connection: http://elasticsearch:9200/"}
kibana_1 | {"type":"log","@timestamp":"2020-07-21T08:57:31Z","tags":["warning","elasticsearch","admin"],"pid":6,"message":"No living connections"}
kibana_1 | {"type":"log","@timestamp":"2020-07-21T08:57:34Z","tags":["warning","elasticsearch","admin"],"pid":6,"message":"Unable to revive connection: http://elasticsearch:9200/"}
kibana_1 | {"type":"log","@timestamp":"2020-07-21T08:57:34Z","tags":["warning","elasticsearch","admin"],"pid":6,"message":"No living connections"}
kibana_1 | {"type":"log","@timestamp":"2020-07-21T08:57:36Z","tags":["warning","elasticsearch","admin"],"pid":6,"message":"Unable to revive connection: http://elasticsearch:9200/"}
Kindly let me know what would be the issue on prod server when same is working on my dev? Note: firewall is disabled on this server