Working example for Kabina and ElasticSearch

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

here are some links that might be helpful:

https://www.elastic.co/guide/en/kibana/current/docker.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html

https://hub.docker.com/_/kibana
https://hub.docker.com/_/elasticsearch


This the end results when I use the version 6.6.0 . Looks like the elasticsearch is up but the kibana still not able to talks to elasticseach
kibana-x | {"type":"log","@timestamp":"2019-02-09T16:13:10Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://elasticsearch-x:9202/"}
kibana-x | {"type":"log","@timestamp":"2019-02-09T16:13:10Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}
http://localhost:9202/
{
"name" : "eBUaa8-",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "RmQozyNZTGOvQftbh3VgLg",
"version" : {
"number" : "6.6.0",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "a9861f4",
"build_date" : "2019-01-24T11:27:09.439740Z",
"build_snapshot" : false,
"lucene_version" : "7.6.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}

http://localhost:5602/

Kibana server is not ready yet

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