# Cloud-aws 2.3.1 authentication error when used for snapshots

**URL:** <https://discuss.elastic.co/t/cloud-aws-2-3-1-authentication-error-when-used-for-snapshots/64629>\
**Category:** Elasticsearch\
**Created:** [November 1, 2016, 8:17pm UTC](https://discuss.elastic.co/t/cloud-aws-2-3-1-authentication-error-when-used-for-snapshots/64629 "2016-11-01T20:17:08Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![weed101](https://avatars.discourse-cdn.com/v4/letter/w/f05b48/32.png) [@weed101](https://discuss.elastic.co/u/weed101)\
**Post date:** [November 1, 2016, 8:17pm UTC](https://discuss.elastic.co/t/cloud-aws-2-3-1-authentication-error-when-used-for-snapshots/64629/1 "2016-11-01T20:17:08Z")

</div>

I'm currently using Elasticsearch 2.3.1 with the cloud-aws-2.3.1 plugin on a single node to evaluate snapshots to S3.

When I issue the curl -XPUT '[http://localhost:9200/\_snapshot/s3\_backups?pretty](http://localhost:9200/_snapshot/s3_backups?pretty)' -d '  
{  
"type" : "s3",  
"settings": {  
"bucket": "mySnapshots",  
"endpoint": "[storage.s3.inhouse.com](http://storage.s3.inhouse.com)",  
"protocol": "https:",  
"access\_key": "xxxxxxxxxxxx",  
"secret\_key": "xxxxxxxxxxxx"  
}  
}  
'

I get a "status" : 500 response returned.  
"caused\_by" : {  
"type" : "creation\_exception",  
"reason" : "Guice creation errors:\n\n1) Error injection constructor, com.amazonaws.AmazonClientExcption: Unable to execute HTTP request: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target\n at org.elasticserach.repositories.s3.S3Repository\n while locating org.elasticsearch.repositories.REpository\n\n1 error:,  
.  
.  
.

Essentially, the message appears to be telling me that it can't find the server certs. Since I don't have shield on the server, is there another property in the elasticsearch.yml file I am suppose to add the server certs to?

Thanks,  
D

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 1, 2016, 9:32pm UTC](https://discuss.elastic.co/t/cloud-aws-2-3-1-authentication-error-when-used-for-snapshots/64629/2 "2016-11-01T21:32:20Z")

</div>

Can you replace protocol to "https"?

---

<div class="post-metadata">

**Author:** ![weed101](https://avatars.discourse-cdn.com/v4/letter/w/f05b48/32.png) [@weed101](https://discuss.elastic.co/u/weed101)\
**Post date:** [November 2, 2016, 4:22pm UTC](https://discuss.elastic.co/t/cloud-aws-2-3-1-authentication-error-when-used-for-snapshots/64629/3 "2016-11-02T16:22:27Z")

</div>

Hmm, that sort of clears the problem of getting the 500 response. But now I get a  
curl: (35) SSL connect error.

Since, I don't have shield on this instance. I'm not sure how or where I can add my server certs to it.

Thanks,

D

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 2, 2016, 5:04pm UTC](https://discuss.elastic.co/t/cloud-aws-2-3-1-authentication-error-when-used-for-snapshots/64629/4 "2016-11-02T17:04:42Z")

</div>

You get that doing what exactly?

---

<div class="post-metadata">

**Author:** ![weed101](https://avatars.discourse-cdn.com/v4/letter/w/f05b48/32.png) [@weed101](https://discuss.elastic.co/u/weed101)\
**Post date:** [November 2, 2016, 5:58pm UTC](https://discuss.elastic.co/t/cloud-aws-2-3-1-authentication-error-when-used-for-snapshots/64629/5 "2016-11-02T17:58:41Z")

</div>

Sorry about that.

I issued the command:  
curl -XPUT '[https://localhost:9200/\_snapshot/s3\_backups?pretty](https://localhost:9200/_snapshot/s3_backups?pretty)' -d @/tmp/register\_s3.json

and the response is:  
curl: (35) SSL connect error

I tried it like this to  
curl -k -XPUT '[https://localhost:9200/\_snapshot/s3\_backups?pretty](https://localhost:9200/_snapshot/s3_backups?pretty)' -d @/tmp/register\_s3.json

and the response is:  
curl: (35) SSL connect error

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 2, 2016, 6:11pm UTC](https://discuss.elastic.co/t/cloud-aws-2-3-1-authentication-error-when-used-for-snapshots/64629/6 "2016-11-02T18:11:18Z")

</div>

But you don't have Shield as far as I know. So you can't call [https://localhost:9200](https://localhost:9200) but [http://localhost:9200](http://localhost:9200)

---

<div class="post-metadata">

**Author:** ![weed101](https://avatars.discourse-cdn.com/v4/letter/w/f05b48/32.png) [@weed101](https://discuss.elastic.co/u/weed101)\
**Post date:** [November 2, 2016, 6:14pm UTC](https://discuss.elastic.co/t/cloud-aws-2-3-1-authentication-error-when-used-for-snapshots/64629/7 "2016-11-02T18:14:53Z")

</div>

That's what I tough to. But you asked me if I could replace protocol to https. or did I mis-understand?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 2, 2016, 7:08pm UTC](https://discuss.elastic.co/t/cloud-aws-2-3-1-authentication-error-when-used-for-snapshots/64629/8 "2016-11-02T19:08:46Z")

</div>

No I meant that instead of:

```auto
curl -XPUT 'http://localhost:9200/_snapshot/s3_backups?pretty' -d '{
  "type" : "s3",
  "settings": {
    "bucket": "mySnapshots",
    "endpoint": "storage.s3.inhouse.com",
    "protocol": "https:",
    "access_key": "xxxxxxxxxxxx",
    "secret_key": "xxxxxxxxxxxx"
  }
}'

```

You write:

```auto
curl -XPUT 'http://localhost:9200/_snapshot/s3_backups?pretty' -d '{
  "type" : "s3",
  "settings": {
    "bucket": "mySnapshots",
    "endpoint": "storage.s3.inhouse.com",
    "protocol": "https",
    "access_key": "xxxxxxxxxxxx",
    "secret_key": "xxxxxxxxxxxx"
  }
}'

```

---

<div class="post-metadata">

**Author:** ![weed101](https://avatars.discourse-cdn.com/v4/letter/w/f05b48/32.png) [@weed101](https://discuss.elastic.co/u/weed101)\
**Post date:** [November 2, 2016, 7:51pm UTC](https://discuss.elastic.co/t/cloud-aws-2-3-1-authentication-error-when-used-for-snapshots/64629/9 "2016-11-02T19:51:48Z")

</div>

oh I see.

I removed the colon from:

> "protocol": "https:",

to:

> ```
> "protocol": "https"
> 
> ```

and I get the same 500 response.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 2, 2016, 9:14pm UTC](https://discuss.elastic.co/t/cloud-aws-2-3-1-authentication-error-when-used-for-snapshots/64629/10 "2016-11-02T21:14:15Z")

</div>

May be we have an issue with https support? It will require some days to test that I think.  
Can you try with `http` in the meantime?

Also may be change the log level to DEBUG?

---

<div class="post-metadata">

**Author:** ![weed101](https://avatars.discourse-cdn.com/v4/letter/w/f05b48/32.png) [@weed101](https://discuss.elastic.co/u/weed101)\
**Post date:** [November 2, 2016, 11:51pm UTC](https://discuss.elastic.co/t/cloud-aws-2-3-1-authentication-error-when-used-for-snapshots/64629/11 "2016-11-02T23:51:26Z")

</div>

I got it working 🙂

I ended up adding the other S3 server to the cacerts in the java security file and restarting Elasticsearch.

yeah!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 3, 2016, 4:33am UTC](https://discuss.elastic.co/t/cloud-aws-2-3-1-authentication-error-when-used-for-snapshots/64629/12 "2016-11-03T04:33:49Z")

</div>

Great! May be it is worth adding that in our docs?  
Wanna contribute some content?

---

<div class="post-metadata">

**Author:** ![weed101](https://avatars.discourse-cdn.com/v4/letter/w/f05b48/32.png) [@weed101](https://discuss.elastic.co/u/weed101)\
**Post date:** [November 3, 2016, 11:26am UTC](https://discuss.elastic.co/t/cloud-aws-2-3-1-authentication-error-when-used-for-snapshots/64629/13 "2016-11-03T11:26:07Z")

</div>

Sure, no problem.

---

<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:** [July 5, 2017, 10:07pm UTC](https://discuss.elastic.co/t/cloud-aws-2-3-1-authentication-error-when-used-for-snapshots/64629/14 "2017-07-05T22:07:00Z")

</div>


