hi, im having difficulties when changing my logstash SSL certificate, today i have a certificate that is in the /etc/logstash folder and i generated a new one through the elastic tool, using Elasticsearch-certutil and then Im generating the .crt through from openssl. The new certificate is already correctly named everywhere and with the proper permissions, same as the old certificate that works.
however, when i upload the new certificate, this error appears below in the logstash log
[2022-02-17T15:15:43,619][WARN ][logstash.outputs.Elasticsearch][main] Attempted to resurrect connection to dead ES instance, but got an error {:url=>"https://elastic:xxxxxx@localhost:9200/", :exception=>LogStash::Outputs::Elasticsearch::HttpClient::Pool::HostUnreachableError, :message=>"Elasticsearch Unreachable: [https://elastic:xxxxxx@localhost:9200/][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"}
my configuration file is as follows (only the certificate snippet was pasted here)
output {
if [type] == "host-1" {
elasticsearch {
hosts => ["https://localhost:9200"]
#index => "cacheaudit-cloud1-%{+YYYY.MM.dd}"
user => "user"
password => "pass"
ssl => true
ssl_certificate_verification => false
cacert => "/etc/logstash/ca.crt"
ilm_rollover_alias => "cacheaudit-host1"
ilm_policy => "cache-lifecycle"
}
}
if [type] == "host-2" {
elasticsearch {
hosts => ["https://localhost:9200"]
#index => "cacheaudit-cloud2-%{+YYYY.MM.dd}"
user => "user"
password => "pass"
ssl => true
ssl_certificate_verification => false
cacert => "/etc/logstash/ca.crt"
ilm_rollover_alias => "cacheaudit-host2"
ilm_policy => "cache-lifecycle"
}
}
}
the new SSL certificate is valid until 2025
someone can help me with this issue?