# Error Creating S3 Repository

**URL:** https://discuss.elastic.co/t/error-creating-s3-repository/347178
**Category:** Elasticsearch
**Tags:** snapshot-and-restore
**Created:** [November 14, 2023, 11:57pm UTC](https://discuss.elastic.co/t/error-creating-s3-repository/347178 "2023-11-14T23:57:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ben\_GSP](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ben_gsp/32/127573_2.png) [@Ben\_GSP](https://discuss.elastic.co/u/Ben_GSP)
#### Post date: [November 14, 2023, 11:57pm UTC](https://discuss.elastic.co/t/error-creating-s3-repository/347178/1 "2023-11-14T23:57:15Z")

</div>

I'm getting the following error when attempting to create a new s3 repository:

```auto
{
  "error": {
    "root_cause": [
      {
        "type": "repository_exception",
        "reason": "[s3_01] Could not determine repository generation from root blobs"
      }
    ],
    "type": "repository_exception",
    "reason": "[s3_01] Could not determine repository generation from root blobs",
    "caused_by": {
      "type": "i_o_exception",
      "reason": "Exception when listing blobs by prefix [index-]",
      "caused_by": {
        "type": "sdk_client_exception",
        "reason": "Failed to connect to service endpoint: ",
        "caused_by": {
          "type": "socket_timeout_exception",
          "reason": "Connect timed out"
        }
      }
    }
  },
  "status": 500
}

```

I have:

- Installed the S3 plugin on all nodes, and restarted each node.
- Set s3.client.default.access\_key and s3.client.default.secret\_key using elasticsearch-keystore command.
- Reloaded secure settings.
- Successfully tested uploads to the bucket with s3cmd using the access key and secret key I have set.

I'm using the most basic call with minimal settings:

```auto
curl -XPUT https://my_es_node:9200/_snapshot/s3_01 -H 'Content-Type: application/json' -d '{
  "type": "s3",
  "settings": {
    "bucket": "my_bucket_name"
  }
}'

```

Any help would be appreciated.

---

<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: [December 12, 2023, 11:57pm UTC](https://discuss.elastic.co/t/error-creating-s3-repository/347178/2 "2023-12-12T23:57:23Z")

</div>

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