# S3 Repository plugin PKIX failed

**URL:** <https://discuss.elastic.co/t/s3-repository-plugin-pkix-failed/222183>\
**Category:** Elasticsearch\
**Created:** [March 5, 2020, 12:23am UTC](https://discuss.elastic.co/t/s3-repository-plugin-pkix-failed/222183 "2020-03-05T00:23:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivanavi](https://avatars.discourse-cdn.com/v4/letter/i/ac91a4/32.png) [@ivanavi](https://discuss.elastic.co/u/ivanavi)\
**Post date:** [March 5, 2020, 12:23am UTC](https://discuss.elastic.co/t/s3-repository-plugin-pkix-failed/222183/1 "2020-03-05T00:23:31Z")

</div>

Hi all,

I have 1 cluster (Ubuntu 18.04) with 3 ES 7.4.2 nodes with Offline install 7.4.2 S3 Repository plugin.

I installed plugin than I did restart of every node.

I added keys on every node and did restart

```
bin/elasticsearch-keystore add s3.client.default.access_key
bin/elasticsearch-keystore add s3.client.default.secret_key

```

I tried to add repo

```
PUT /_snapshot/s4
{
  "type": "s3",
  "settings": {
    "bucket": "elk-dev",
    "endpoint": "mys3.host.com",        
    "protocol": "https"
  }
}

```

I am getting

> {"error":{"root\_cause":[{"type":"repository\_verification\_exception","reason":"[s4] path is not accessible on master node"}],"type":"repository\_verification\_exception","reason":"[s4] path is not accessible on master node","caused\_by":{"type":"i\_o\_exception","reason":"Unable to upload object [tests-4RwL-Ps0T2SDfhj2i3v\_Vg/master.dat] using a single upload","caused\_by":{"type":"sdk\_client\_exception","reason":"Unable to execute HTTP request: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target","caused\_by":{"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}

I can connect from that server with mc to my S3 server without any problem.

I also tried SSLPoke and it worked.

I have Suse Linux 12, ES 6.5.4 cluster and S3 plugin is working fine.

I have no idea what could be wrong with 7.4.2 and Ubuntu..

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![ivanavi](https://avatars.discourse-cdn.com/v4/letter/i/ac91a4/32.png) [@ivanavi](https://discuss.elastic.co/u/ivanavi)\
**Post date:** [March 5, 2020, 10:59am UTC](https://discuss.elastic.co/t/s3-repository-plugin-pkix-failed/222183/2 "2020-03-05T10:59:36Z")

</div>

Issue has been resolved

> openssl s\_client -connect [mys3.host.com:443](http://mys3.host.com:443) \< /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' \> public.crt

> /usr/share/elasticsearch/jdk/bin/keytool -import -alias [mys3host.com](http://mys3host.com) -keystore /usr/share/elasticsearch/jdk/lib/security/cacerts -file public.crt

Than it asked me for password, password is **changeit**

---

<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:** [April 2, 2020, 10:59am UTC](https://discuss.elastic.co/t/s3-repository-plugin-pkix-failed/222183/3 "2020-04-02T10:59:38Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
