# Elasticsearch Unreachable!

**URL:** <https://discuss.elastic.co/t/elasticsearch-unreachable/223168>\
**Category:** Elasticsearch\
**Created:** [March 11, 2020, 3:08pm UTC](https://discuss.elastic.co/t/elasticsearch-unreachable/223168 "2020-03-11T15:08:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Youssef\_SBAI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youssef_sbai/32/64242_2.png) [@Youssef\_SBAI](https://discuss.elastic.co/u/Youssef_SBAI)\
**Post date:** [March 11, 2020, 3:08pm UTC](https://discuss.elastic.co/t/elasticsearch-unreachable/223168/1 "2020-03-11T15:08:07Z")

</div>

Hi,

i am getting below error, after enable firewall on the logstash server.

```
2020-03-11T15:46:14,189][WARN][logstash.outputs.elasticsearch] Attempted to 
resurrect connection to dead ES instance, but got an error. 
{:url=>"http://elasticsearch-supervision.swarm-14.recette:9200/",  
:error_type=>LogStash:: 
Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError , :error=>" 
Elasticsearch Unreachable
```

---

<div class="post-metadata">

**Author:** ![rameshkr1994](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rameshkr1994/32/59029_2.png) [@rameshkr1994](https://discuss.elastic.co/u/rameshkr1994)\
**Post date:** [March 12, 2020, 8:31am UTC](https://discuss.elastic.co/t/elasticsearch-unreachable/223168/2 "2020-03-12T08:31:47Z")

</div>

Hi @Youssef_SBAI.

welcome 🙂

I think your machine is not running currently pls check either its running or not?

> another thing , check your elastic machine host/ip?

Thanks  
HadoopHelp

---

<div class="post-metadata">

**Author:** ![Youssef\_SBAI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youssef_sbai/32/64242_2.png) [@Youssef\_SBAI](https://discuss.elastic.co/u/Youssef_SBAI)\
**Post date:** [March 12, 2020, 8:39am UTC](https://discuss.elastic.co/t/elasticsearch-unreachable/223168/3 "2020-03-12T08:39:20Z")

</div>

Im in docker, my docker compose is

services:

```
elasticsearch:

    image: registry.gitlab.hello.fr/devops/applications/docker.elastic.co/elasticsearch:6.8.3

    networks:

        - default

        - swarm-system_traefik

    volumes:

        - /usr/share/zoneinfo/Europe/Paris:/etc/localtime

        - /data/volumes/monitoring/elasticsearch/data:/usr/share/elasticsearch/data

        - /data/volumes/monitoring/elasticsearch/logs:/usr/share/elasticsearch/logs

    environment:

        http.host: 0.0.0.0

        xpack.security.enabled: "false"

        discovery.zen.minimum_master_nodes: 1

        node.master: "true"

        node.data: "true"

        node.ingest: "true"

        ES_JAVA_OPTS: -Xms2048m -Xmx2048m

        MACIF_DOCKER_NODE_ID: "{{.Node.ID}}"

        MACIF_DOCKER_NODE_NAME: "{{.Node.Hostname}}"

        MACIF_DOCKER_SERVICE_ID: "{{.Service.ID}}"

        MACIF_DOCKER_SERVICE_NAME: "{{.Service.Name}}"

        MACIF_DOCKER_SERVICE_LABELS: "{{.Service.Labels}}"

        MACIF_DOCKER_TASK_ID: "{{.Task.ID}}"

        MACIF_DOCKER_TASK_NAME: "{{.Task.Name}}"

        MACIF_DOCKER_TASK_SLOT: "{{.Task.Slot}}"

        MACIF_CLUSTER: "${MACIF_CLUSTER}"

        MACIF_STACK: "${MACIF_STACK}"

        MACIF_TYPE: "${MACIF_TYPE}"

        MACIF_APP: "${MACIF_APPLICATION}"

    healthcheck:

        test: ["CMD", "curl", "-f", "http://localhost:9200/_cat/health"]

        interval: 30s

        timeout: 10s

        retries: 3

        start_period: 3m

    deploy:

        labels:

            - "traefik.docker.network=swarm-system_traefik"

            - "traefik.port=9200"

            - "traefik.frontend.rule=Host:elasticsearch-supervision.${DOCKER_COMPOSE_DOMAIN}"

            #- "traefik.frontend.auth.basic=${elastic.auth.user}:${elastic.auth.hashpassword}"

            

kibana:

    image: registry.gitlab.macif.fr/devops/applications/docker.elastic.co/kibana:6.6.2

    volumes:

        - /etc/localtime:/etc/localtime:ro

        #- /data/volumes/monitoring/kibana/plugins:/usr/share/kibana/plugins

    environment:

        TZ: Europe/Paris

        ELASTICSEARCH_URL: http://elasticsearch:9200

    networks:

        - default

        - swarm-system_traefik

    deploy:

        labels:

            - "traefik.port=5601"

            - "traefik.frontend.rule=Host:kibana-supervision.${DOCKER_COMPOSE_DOMAIN}"

            - "traefik.docker.network=swarm-system_traefik"

            #- "traefik.frontend.redirect.entryPoint=https"

        resources:

            limits:

                memory: 2G

            reservations:

                memory: 2G

logstash:

    image: registry.gitlab.hello.fr/devops/applications/docker.elastic.co/logstash:6.6.2

    volumes:

        - /etc/localtime:/etc/localtime:ro

        - /data/volumes/monitoring/logstash/pipeline:/usr/share/logstash/pipeline

    environment:

        TZ: Europe/Paris

    networks:

        - default

        - swarm-system_traefik

    ports:

        - 5044:5044

    deploy:

        replicas: 2

        resources:

            limits:

                memory: 4G

            reservations:

                memory: 4G

               

grafana:

    image: grafana/grafana

    ports:

        - "3000:3000"

    volumes:

        - /data/volumes/monitoring/garfana/data:/var/lib/grafana

    environment:

        - GF_SERVER_ROOT_URL=http://grafana-supervision.${DOCKER_COMPOSE_DOMAIN}:3000/

        - GF_SECURITY_ADMIN_USER=admin

        - GF_SECURITY_ADMIN_PASSWORD=admin

        #- GF_SMTP_ENABLED=true

        #- GF_SMTP_HOST=smtp.gmail.com:587

        #- GF_SMTP_USER=grafana@example.com

        #- GF_SMTP_FROM_ADDRESS=grafana@example.com

        #- GF_SMTP_PASSWORD= ******

        - GF_USERS_ALLOW_SIGN_UP=false

        - GF_ALERTING_ERROR_OR_TIMEOUT=keep_state

    networks:

        - default

        - swarm-system_traefik

    deploy:

        labels:

            - "traefik.port=3000"

            - "traefik.frontend.rule=Host:grafana-supervision.${DOCKER_COMPOSE_DOMAIN}"

            - "traefik.docker.network=swarm-system_traefik"

    restart: always                   

 

filebeat:

    image: registry.gitlab.hello.fr/devops/applications/docker.elastic.co/filebeat:7.5.0

    volumes:

        - /etc/localtime:/etc/localtime:ro

        - /data/volumes/monitoring/filebeat:/etc/filebeat

    environment:

        TZ: Europe/Paris

    networks:

        - default

        - swarm-system_traefik

    deploy:

        replicas: 2

        resources:

            limits:

                memory: 512m

            reservations:

                memory: 512m

```

networks:

```
default:

swarm-system_traefik:

    external: true
```

---

<div class="post-metadata">

**Author:** ![Youssef\_SBAI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youssef_sbai/32/64242_2.png) [@Youssef\_SBAI](https://discuss.elastic.co/u/Youssef_SBAI)\
**Post date:** [March 12, 2020, 8:40am UTC](https://discuss.elastic.co/t/elasticsearch-unreachable/223168/4 "2020-03-12T08:40:39Z")

</div>

and my conf from logsash is

```
input {

beats {
port => "5044"
}

}  

filter {

csv {

separator => ";"

columns => ["chaine", "job", "date_plan", "statut", "date_debut", "date_fin", "serveur", 
"numero_passage", "application", "sous_application^M"]

 }

mutate {
convert => { "numero_passage" => "integer" }
}
date {
match => ["date_plan" , "YYYY-MM-dd"]
timezone => "Europe/Paris"
}
date {
match => ["date_debut" , "YYYY-MM-dd HH:mm:ss"]
timezone => "Europe/Paris"
}
date {
match => ["date_fin" , "YYYY-MM-dd HH:mm:ss"]
timezone => "Europe/Paris"
}
}
output {
elasticsearch { 
hosts => ["elasticsearch:9200"]
index => "poca"
}
stdout {}
}
```

---

<div class="post-metadata">

**Author:** ![Youssef\_SBAI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youssef_sbai/32/64242_2.png) [@Youssef\_SBAI](https://discuss.elastic.co/u/Youssef_SBAI)\
**Post date:** [March 12, 2020, 8:55am UTC](https://discuss.elastic.co/t/elasticsearch-unreachable/223168/5 "2020-03-12T08:55:55Z")

</div>

my machine is running currently

---

<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:** [March 12, 2020, 9:00am UTC](https://discuss.elastic.co/t/elasticsearch-unreachable/223168/6 "2020-03-12T09:00:42Z")

</div>

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.  
Please update your post.

---

<div class="post-metadata">

**Author:** ![rameshkr1994](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rameshkr1994/32/59029_2.png) [@rameshkr1994](https://discuss.elastic.co/u/rameshkr1994)\
**Post date:** [March 12, 2020, 2:06pm UTC](https://discuss.elastic.co/t/elasticsearch-unreachable/223168/7 "2020-03-12T14:06:58Z")

</div>

Hi @Youssef_SBAI.

I think you are passing host-name like `http://elasticsearch-supervision.swarm-14.recette:9200/`

but in configuration file mentioned something different as below-  
`output { elasticsearch { hosts => ["elasticsearch:9200"] index => "poca" }`

> Please check ,i think you are missing something with elastic-search address.

Thanks  
HadoopHelp

---

<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:** [April 9, 2020, 2:07pm UTC](https://discuss.elastic.co/t/elasticsearch-unreachable/223168/8 "2020-04-09T14:07:07Z")

</div>

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