# Error unable to find valid certification path

**URL:** <https://discuss.elastic.co/t/error-unable-to-find-valid-certification-path/122304>\
**Category:** Logstash\
**Created:** [March 2, 2018, 6:13pm UTC](https://discuss.elastic.co/t/error-unable-to-find-valid-certification-path/122304 "2018-03-02T18:13:45Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![hallaoui](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hallaoui/32/77342_2.png) [@hallaoui](https://discuss.elastic.co/u/hallaoui)\
**Post date:** [September 3, 2020, 8:39am UTC](https://discuss.elastic.co/t/error-unable-to-find-valid-certification-path/122304/7 "2020-09-03T08:39:16Z")

</div>

Hi Roger,

I faced same issue using below config then I fixed it following what you shared in the previous post.

```auto
Config:
  elasticsearch {
    hosts => ["https://45cd934da9d443b187c79007c5bcb586.10.30.30.204.ip.es.io:9243"]
    index => "cars"
    user => "elastic"
    password => "05b7jz5qldMlRX5tUAQnV8ff"
    document_type => "used_car_for_sell"
  }

Error:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Fix:
# echo -n | openssl s_client -connect 45cd934da9d443b187c79007c5bcb586.10.30.30.204.ip.es.io:9243 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ./ca_logstash.cer
# sudo keytool -import -alias saelk -file ca_logstash.cer -keystore /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-0.el8_2.x86_64/jre/lib/security/cacerts

```

Thanks for your support.

Hamid

---

_[View the full topic](https://discuss.elastic.co/t/error-unable-to-find-valid-certification-path/122304)._
