# Error \[Manticore::ResolutionFailure\] elasticsearch: Name or service not known"} at docker-compose

**URL:** https://discuss.elastic.co/t/error-manticore-resolutionfailure-elasticsearch-name-or-service-not-known-at-docker-compose/184384
**Category:** Elasticsearch
**Created:** [June 5, 2019, 2:25pm UTC](https://discuss.elastic.co/t/error-manticore-resolutionfailure-elasticsearch-name-or-service-not-known-at-docker-compose/184384 "2019-06-05T14:25:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![freelanseod](https://avatars.discourse-cdn.com/v4/letter/f/e95f7d/32.png) [@freelanseod](https://discuss.elastic.co/u/freelanseod)
#### Post date: [June 5, 2019, 2:25pm UTC](https://discuss.elastic.co/t/error-manticore-resolutionfailure-elasticsearch-name-or-service-not-known-at-docker-compose/184384/1 "2019-06-05T14:25:53Z")

</div>

Hello to everyone!  
Can anyone help with this?

```auto
[WARN][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://localhost:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://localhost:9200/][Manticore::SocketException] Connection refused (Connection refused)"}

```

Docker-compose.yml looks like this

```auto
elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.0.1
    restart: unless-stopped
    ports:
      - "9200:9200"
      - "9300:9300"
    environment:
      - discovery.type=single-node
      - XPACK_SECURITY_ENABLED=false
      - XPACK_REPORTING_ENABLED=false
      - XPACK_MONITORING_ENABLED=false
# - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    depends_on:
      - logstash

  kibana:
    image: docker.elastic.co/kibana/kibana:7.0.1
    ports:
      - "5601:5601"
    depends_on:
      - elasticsearch
    restart: unless-stopped

  logstash:
    image: docker.elastic.co/logstash/logstash:7.0.1
    networks:
      - elk
    environment:
      - XPACK_SECURITY_ENABLED=false
      - XPACK_REPORTING_ENABLED=false
      - XPACK_MONITORING_ENABLED=false
      - ELASTIC_HOST=localhost:9200
    ports:
      - "5046:5046"
    volumes:
      - ./config/pipelines.yml:/usr/share/logstash/config/pipelines.yml:ro
      - ./config/pipelines:/usr/share/logstash/config/pipelines:ro

```

I have habr\_pipeline.conf

```auto
input {
  tcp {
    port => "5046"
  }
}
filter {
  mutate {
    add_field => ["habra_field", "Hello Habr"]
  }
}
output {
  elasticsearch {
    hosts => "${ELASTIC_HOST}"
    user => ""
    password => ""
    index => "ts_indicator_description"
  }
}

```

When I change localhost to elasticsearch, I have nearly the same mistake

```auto
WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://elasticsearch:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::ResolutionFailure] elasticsearch"}

```

What I need to change?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [June 5, 2019, 3:37pm UTC](https://discuss.elastic.co/t/error-manticore-resolutionfailure-elasticsearch-name-or-service-not-known-at-docker-compose/184384/2 "2019-06-05T15:37:03Z")

</div>

I think you need to add the following to elasticsearch and kibana as well:

```auto
    networks:
      - elk

```

---

<div class="post-metadata">

### Author: ![freelanseod](https://avatars.discourse-cdn.com/v4/letter/f/e95f7d/32.png) [@freelanseod](https://discuss.elastic.co/u/freelanseod)
#### Post date: [June 5, 2019, 3:53pm UTC](https://discuss.elastic.co/t/error-manticore-resolutionfailure-elasticsearch-name-or-service-not-known-at-docker-compose/184384/3 "2019-06-05T15:53:11Z")

</div>

Thank you so much!

---

<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: [July 3, 2019, 3:53pm UTC](https://discuss.elastic.co/t/error-manticore-resolutionfailure-elasticsearch-name-or-service-not-known-at-docker-compose/184384/4 "2019-07-03T15:53:18Z")

</div>

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