# Logstash unable to connect to elasticsearch

**URL:** <https://discuss.elastic.co/t/logstash-unable-to-connect-to-elasticsearch/283548>\
**Category:** Logstash\
**Created:** [September 7, 2021, 2:39pm UTC](https://discuss.elastic.co/t/logstash-unable-to-connect-to-elasticsearch/283548 "2021-09-07T14:39:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![geetika\_gopi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/geetika_gopi/32/93548_2.png) [@geetika\_gopi](https://discuss.elastic.co/u/geetika_gopi)\
**Post date:** [September 7, 2021, 2:39pm UTC](https://discuss.elastic.co/t/logstash-unable-to-connect-to-elasticsearch/283548/1 "2021-09-07T14:39:14Z")

</div>

I have SSL enabled on all my elastic nodes, using a self signed certificate. However logstash is unable to connect to elasticsearch. Gives the following error

```auto
[2021-09-07T10:34:50,283][WARN][logstash.outputs.elasticsearch][f5_waf] Attempted to resurrect connection to dead ES instance, but got an error {:url=>"https://user:xxxxxx@a.b.c.d:9200/", :exception=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :message=>"Elasticsearch Unreachable: [https://user:xxxxxx@a.b.c.d:9200/][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"}

```

Below is my logstash output section:

```auto
output {
    elasticsearch {
        hosts => [MASKED]
        user => user
        password => MASKED
        ssl => true
        cacert => "/etc/logstash/imported_elastic_ca.pem"
        ssl_certificate_verification => false
        index => "F5-WAF-%{+YYYY.MM.dd}"
    }
}

```

At this point I have tried almost everything. Event imported the cert into the java key store. Any assistance would be appreciated 🙂

---

<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:** [October 5, 2021, 2:39pm UTC](https://discuss.elastic.co/t/logstash-unable-to-connect-to-elasticsearch/283548/2 "2021-10-05T14:39:24Z")

</div>

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