Hi there !
So first of all, thank your for reading my post.
I have already browsed the existing topics on discuss about that kind of issue and that is what I have tried without any success:
- Setup
ssl_certificate_verification
tofalse
- Tried to use the generated
ca.crt
generated by ECK during setup
What ever I do, I sill have in Logstash logs:
[2020-03-11T11:19:53,509][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"https://elastic:xxxxxx@quickstart-es-http.default.svc.cluster.local:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [https://elastic:xxxxxx@quickstart-es-http.default.svc.cluster.local:9200/][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"}
However, from within the container:
curl -k "https://elastic:${ELASTIC_PASSWORD}@quickstart-es-http.default.svc.cluster.local:9200"
{
"name" : "quickstart-es-default-0",
"cluster_name" : "quickstart",
"cluster_uuid" : "-jsLCLX4TeKWHEnRlrpo0g",
"version" : {
"number" : "7.4.2",
"build_flavor" : "default",
"build_type" : "docker",
"build_hash" : "2f90bbf7b93631e52bafb59b3b049cb44ec25e96",
"build_date" : "2019-10-28T20:40:44.881551Z",
"build_snapshot" : false,
"lucene_version" : "8.2.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
So it seems that the DNS resolution and network are OK ...
So questions:
- Why the
ssl_certificate_verification => false
does not work .... - What kind of certificate of ECK can I use
Because, indeed, trying to use the cert file from ECK do not work either
$ curl --cacert /ca.crt "https://elastic:${ELASTIC_PASSWORD}@quickstart-es-http.default.svc.cluster.local:9200/"
curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate.
$ kubectl get secrets quickstart-es-http-certs-public -o go-template='{{index .data "ca.crt" | base64decode }}' > ca-public.crt
$ openssl x509 -noout -subject -in ca-public.crt
subject=OU = quickstart, CN = quickstart-http
$ kubectl get secrets quickstart-es-http-certs-public -o go-template='{{index .data "tls.crt" | base64decode }}' > tls-public.crt
$ openssl x509 -noout -subject -in tls-public.crt
subject=OU = quickstart, CN = quickstart-es-http.default.es.local
Almost forgot:
$ logstash --version
logstash 7.4.2
From the official docker image from Elastic
Thank you for your help !