Error unable to find valid certification path

Hi Roger,

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

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

1 Like