# Cannot create repository on a MinIO instance

**URL:** <https://discuss.elastic.co/t/cannot-create-repository-on-a-minio-instance/344055>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [September 28, 2023, 10:07am UTC](https://discuss.elastic.co/t/cannot-create-repository-on-a-minio-instance/344055 "2023-09-28T10:07:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![astingengo](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@astingengo](https://discuss.elastic.co/u/astingengo)\
**Post date:** [September 28, 2023, 10:07am UTC](https://discuss.elastic.co/t/cannot-create-repository-on-a-minio-instance/344055/1 "2023-09-28T10:07:23Z")

</div>

ES version: 7.17.13

What I did:

- I installed s3-repository
- I created the generic keystore for access key and secret key and mounted as secret with secureSettings.secretName
- Installed on Kubernetes cluster [so all changes are on all 3 pods]

Trying to create the snapshot as [after exposed it locally]:

```auto
    curl -k -X PUT -u elastic:pass "https://localhost:9200/_snapshot/my_snapshot?pretty" -H "Content-Type: application/json" -d'{
      "type": "s3",
      "settings": {
          "client": "default",
          "bucket": "mybucket",
          "base_path": "elasticsearch",
          "endpoint": "https://minio.domain.com:9000",
          "protocol": "https"
      }
  }'

```

and the response is

```auto
{
  "error" : {
    "root_cause" : [
      {
        "type" : "repository_verification_exception",
        "reason" : "[my_snapshot] path [elasticsearch] is not accessible on master node"
      }
    ],
    "type" : "repository_verification_exception",
    "reason" : "[my_snapshot] path [elasticsearch] is not accessible on master node",
    "caused_by" : {
      "type" : "i_o_exception",
      "reason" : "Unable to upload object [elasticsearch/tests-pLJOIG3SSpm0sB1RtSMLdA/master.dat] using a single upload",
      "caused_by" : {
        "type" : "sdk_client_exception",
        "reason" : "sdk_client_exception: Unable to execute HTTP request: mybucket.minio.domain.com",
        "caused_by" : {
          "type" : "i_o_exception",
          "reason" : "mybucket.minio.domain.com
        }
      }
    }
  },
  "status" : 500
}

```

now one question would be why I'm seeing bucket name into the endpoint request?

LE: If I'll create the certificate valid for its ip and change [minio.domain.com:9000](http://minio.domain.com:9000) with the actual ip:9000 it will work

How/what should I do to make it work with domains as well?

---

<div class="post-metadata">

**Author:** ![astingengo](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@astingengo](https://discuss.elastic.co/u/astingengo)\
**Post date:** [September 28, 2023, 10:48am UTC](https://discuss.elastic.co/t/cannot-create-repository-on-a-minio-instance/344055/2 "2023-09-28T10:48:09Z")

</div>

Founded the problem, I need to add `path_style_access` on settings

---

<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:** [October 26, 2023, 10:48am UTC](https://discuss.elastic.co/t/cannot-create-repository-on-a-minio-instance/344055/3 "2023-10-26T10:48:28Z")

</div>

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