# Unable to find valid certification path to requested target

**URL:** <https://discuss.elastic.co/t/unable-to-find-valid-certification-path-to-requested-target/272692>\
**Category:** Logstash\
**Created:** [May 11, 2021, 12:06pm UTC](https://discuss.elastic.co/t/unable-to-find-valid-certification-path-to-requested-target/272692 "2021-05-11T12:06:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![osher.l](https://avatars.discourse-cdn.com/v4/letter/o/a698b9/32.png) [@osher.l](https://discuss.elastic.co/u/osher.l)\
**Post date:** [May 11, 2021, 12:06pm UTC](https://discuss.elastic.co/t/unable-to-find-valid-certification-path-to-requested-target/272692/1 "2021-05-11T12:06:38Z")

</div>

We have ELK stack on Kubernetes(version 7.0.0), Logstash is failing to interact with elasticsearch with the following warning and errors, all other components like filebeat and kibana are well functioning.

```auto
[2021-05-11T11:45:21,872][WARN][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"https://xxxx:xxxxxx@elasticsearch:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [https://xxxx:xxxxxx@elasticsearch:9200/][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"}
[2021-05-11T11:45:22,042][WARN][logstash.licensechecker.licensereader] Marking url as dead. Last error: [LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError] Elasticsearch Unreachable: [https://xxxx:xxxxxx@elasticsearch:9200/][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target {:url=>https://osher:xxxxxx@elasticsearch:9200/, :error_message=>"Elasticsearch Unreachable: [https://xxxx:xxxxxx@elasticsearch:9200/][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target", :error_class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError"}
[2021-05-11T11:45:22,053][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=>"Elasticsearch Unreachable: [https://xxxx:xxxxxx@elasticsearch:9200/][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"}

```

The elaticsearch output plugin from logstash.conf:

```auto
 elasticsearch {
                hosts => "${ELASTICSEARCH_HOST}"
                user => "${ELASTICSEARCH_USERNAME}"
                password => "${ELASTICSEARCH_PASSWORD}"
                ssl => true
                cacert => "/usr/share/logstash/config/certs/elasticsearch-ca.pem"
                ilm_rollover_alias => "development"
                ilm_pattern => "000001"
                ilm_policy => "dev-policy"
            }

```

Will appreciate your assistance,

---

<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:** [June 8, 2021, 12:06pm UTC](https://discuss.elastic.co/t/unable-to-find-valid-certification-path-to-requested-target/272692/2 "2021-06-08T12:06:55Z")

</div>

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