elasticsearch – How to resolve the error No living connection while starting Kibana in windows

elasticsearch – How to resolve the error No living connection while starting Kibana in windows

In your kibana.yml configuration file, you need to change the following line:

elasticsearch.hosts: [http://localhost:9200]

to

elasticsearch.hosts: [http://192.168.0.101:9200]

Note: Elasticsearch 7.4.0, Kibana 7.4.0

status: working.

I am using a docker-compose.yml file to run elasticsearch and kibana on localhost. port 9200 is being used by another service so, I have mapped 9201:9200 (9201 of localhost with 9200 of docker container)

In kibana environment variable we are setting elasticsearch host and port (port should be of container port) eg. ELASTICSEARCH_HOSTS=http://elasticsearch:9200

File: docker-compose.yml

version: 3.7

services:

  # Elasticsearch 
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0
    container_name: elasticsearch
    environment:
      - xpack.security.enabled=false
      - discovery.type=single-node
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
    cap_add:
      - IPC_LOCK
    volumes:
      - elasticsearch-data:/usr/share/elasticsearch/data
    ports:
      - 9201:9200
      - 9300:9300

  # Kibana
  kibana:
    container_name: kibana
    image: docker.elastic.co/kibana/kibana:7.4.0
    environment:
      - ELASTICSEARCH_HOSTS=http://elasticsearch:9200
    ports:
      - 5601:5601
    depends_on:
      - elasticsearch

volumes:
  elasticsearch-data:
    driver: local

Elastic search is running at http://localhost:9201, you will get similar to

{
  name : d0bb78764b7e,
  cluster_name : docker-cluster,
  cluster_uuid : Djch5nbnSWC-EqYawp2Cng,
  version : {
    number : 7.4.0,
    build_flavor : default,
    build_type : docker,
    build_hash : 22e1767283e61a198cb4db791ea66e3f11ab9910,
    build_date : 2019-09-27T08:36:48.569419Z,
    build_snapshot : false,
    lucene_version : 8.2.0,
    minimum_wire_compatibility_version : 6.8.0,
    minimum_index_compatibility_version : 6.0.0-beta1
  },
  tagline : You Know, for Search
}

Kibana is running at http://localhost:5601, open in the browser.

Note: if your docker is running on some server other than your local machine, then replace localhost, with that server host

elasticsearch – How to resolve the error No living connection while starting Kibana in windows

Leave a Reply

Your email address will not be published.