# Getting SSL issue when running reindex api for elastic cluster build via eck 1.0.1

**URL:** <https://discuss.elastic.co/t/getting-ssl-issue-when-running-reindex-api-for-elastic-cluster-build-via-eck-1-0-1/235567>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [June 3, 2020, 2:05pm UTC](https://discuss.elastic.co/t/getting-ssl-issue-when-running-reindex-api-for-elastic-cluster-build-via-eck-1-0-1/235567 "2020-06-03T14:05:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![avi1](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@avi1](https://discuss.elastic.co/u/avi1)\
**Post date:** [June 3, 2020, 2:05pm UTC](https://discuss.elastic.co/t/getting-ssl-issue-when-running-reindex-api-for-elastic-cluster-build-via-eck-1-0-1/235567/1 "2020-06-03T14:05:52Z")

</div>

I created elasticsearch cluster with operator (ECK 1.0.1) and configured kibana to talk to elastic cluster. When i'm running reindex api copy the index from our docker elastic cluster to kubernetes cluster I'm getting below error ssl error. I went back to my cluster configuration and modified to so that cluster will use custom http certs instead of default eck certs. I followed this doc for setting up custom certs but cluster is not taking my secret.  
[https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-tls-certificates.html#k8s-setting-up-your-own-certificate](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-tls-certificates.html#k8s-setting-up-your-own-certificate)

```auto
 "error": {
    "root_cause": [
      {
        "type": "s_s_l_handshake_exception",
        "reason": "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"
      }
    ],
    "type": "s_s_l_handshake_exception",
    "reason": "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target",
    "caused_by": {
      "type": "validator_exception",
      "reason": "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target",
      "caused_by": {
        "type": "sun_cert_path_builder_exception",
        "reason": "unable to find valid certification path to requested target"
      }
    }
  },
  "status": 500
}

```

---

<div class="post-metadata">

**Author:** ![avi1](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@avi1](https://discuss.elastic.co/u/avi1)\
**Post date:** [June 3, 2020, 8:49pm UTC](https://discuss.elastic.co/t/getting-ssl-issue-when-running-reindex-api-for-elastic-cluster-build-via-eck-1-0-1/235567/2 "2020-06-03T20:49:26Z")

</div>

custom http certs are working, Its typo in one of the CA chain.  
But I'm still having that ssl error when running kibana reindex api to copy indices from docker elasticsearch to kubernetes elasticsearch cluster.  
Does anyone come across this issue?

---

<div class="post-metadata">

**Author:** ![michael.morello](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael.morello/32/47448_2.png) [@michael.morello](https://discuss.elastic.co/u/michael.morello)\
**Post date:** [June 4, 2020, 7:09am UTC](https://discuss.elastic.co/t/getting-ssl-issue-when-running-reindex-api-for-elastic-cluster-build-via-eck-1-0-1/235567/3 "2020-06-04T07:09:47Z")

</div>

Did you try to inject the certificate of the remote cluster as a `Secret` into the one managed by ECK ?

According to [the documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#reindex-from-remote) you can then set the path to this certificate using the field `reindex.ssl.certificate_authorities` in the configuration.

---

<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:** [November 4, 2022, 8:00am UTC](https://discuss.elastic.co/t/getting-ssl-issue-when-running-reindex-api-for-elastic-cluster-build-via-eck-1-0-1/235567/4 "2022-11-04T08:00:55Z")

</div>


