I try to learn how to use ElasticSearch and Kibana ref to this link:
https://www.humankode.com/asp-net-core/logging-with-elasticsearch-kibana-asp-net-core-and-docker with a minor difference by using docker-compose.
However, I am not able to make kibana service talks to elastic service and here is the error:
Unable to revive connection: http://elasticsearch-x:9298
I could not find much help to bypass this error. Anyone know well about ElasticSearch and Kibana can give me a hint to fix my docker-compose?
Thanks In advance
version: '3.4'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.6.0
container_name: elasticsearch-x
ports:
- 9298:9200
environment:
- ELASTICSEARCH_USERNAME=elastic
- ELASTIC_PASSWORD=changeme
- CLUSTER_NAME=docker-cluster
- NETWORK_HOST=0.0.0.0
networks:
- elasticsearch-network
kibana:
image: docker.elastic.co/kibana/kibana:6.6.0
container_name: kibana-x
environment:
- ELASTICSEARCH_USERNAME=kibana
- ELASTICSEARCH_PASSWORD=changeme
- ELASTICSEARCH_URL=http://elasticsearch-x:9298
ports:
- 5602:5601
networks:
- elasticsearch-network
depends_on:
- elasticsearch
networks:
elasticsearch-network:
driver: bridge