# Docker - Logstash - Error =\> "Elasticsearch Unreachable"

**URL:** <https://discuss.elastic.co/t/docker-logstash-error-elasticsearch-unreachable/145987>\
**Category:** Logstash\
**Created:** [August 24, 2018, 10:10pm UTC](https://discuss.elastic.co/t/docker-logstash-error-elasticsearch-unreachable/145987 "2018-08-24T22:10:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![VietCong](https://avatars.discourse-cdn.com/v4/letter/v/e47774/32.png) [@VietCong](https://discuss.elastic.co/u/VietCong)\
**Post date:** [August 24, 2018, 10:10pm UTC](https://discuss.elastic.co/t/docker-logstash-error-elasticsearch-unreachable/145987/1 "2018-08-24T22:10:06Z")

</div>

I am trying to install ELK using Docker. I have kibana and Elasticsearch both running just fine. I just to push some logs to logstash and keep getting the error below:

[2018-08-24T22:01:24,787][WARN][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error. {:url=\>"[http://elasticsearch:9200/](http://elasticsearch:9200/)", :error\_type=\>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=\>"Elasticsearch Unreachable: [[http://elasticsearch:9200/](http://elasticsearch:9200/)][Manticore::ResolutionFailure] elasticsearch"}

It looks like some DNS issues but I am able to run "curl elasticsearch:9200" from the logstash image without any error.

Below is my docker-compose.yml file:

```
version: '2.2'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.4.0
    container_name: elasticsearch
    environment:
      - cluster.name=docker-cluster
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - esdata1:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
    networks:
      - esnet
  elasticsearch2:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.4.0
    container_name: elasticsearch2
    environment:
      - cluster.name=docker-cluster
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      - "discovery.zen.ping.unicast.hosts=elasticsearch"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - esdata2:/usr/share/elasticsearch/data
    networks:
      - esnet
  kibana:
    image: docker.elastic.co/kibana/kibana:6.4.0
    container_name: kibana
    environment:
       ELASTICSEARCH_URL: http://elasticsearch:9200
    ulimits:
      memlock:
        soft: -1
        hard: -1
# volumes:
# - /root/compose_test/kibana.yml:/usr/share/kibana/config/kibana.yml
    ports: 
      - 5601:5601
    networks:
      - esnet
    depends_on:
      - elasticsearch

  logstash:
    image: docker.elastic.co/logstash/logstash:6.4.0
    container_name: logstash
# environment:
# ELASTICSEARCH_URL: http://elasticsearch:9200
    ulimits:
      memlock:
        soft: -1
        hard: -1
    depends_on:
      - elasticsearch
    networks: 
      - esnet

volumes:
  esdata1:
    driver: local
  esdata2:
    driver: local
# esdata3: 
# driver: local
networks:
  esnet:

```

Please help me resolve this issue 🥺

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 21, 2018, 10:10pm UTC](https://discuss.elastic.co/t/docker-logstash-error-elasticsearch-unreachable/145987/2 "2018-09-21T22:10:07Z")

</div>

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