Read-only URL Repository

Hi,
I just created read-only URL repository and give it a name as "test". I got this error when verify repository:

{
  "error": {
    "root_cause": [
      {
        "type": "repository_exception",
        "reason": "[test] file url [http://testrepo] doesn't match any of the locations specified by path.repo or repositories.url.allowed_urls"
      }
    ],
    "type": "repository_exception",
    "reason": "[test] file url [http://testrepo] doesn't match any of the locations specified by path.repo or repositories.url.allowed_urls"
  },
  "status": 500
}

Can you please pinpoint how can I get this repo verified successfully? I don't know how to find path.repo or repositories.url.allowed_urls.

Thanks.

You need to change repositories.url.allowed_urls according to the docs:

URLs using the http, https, or ftp protocols must be explicitly allowed with the repositories.url.allowed_urls cluster setting. This setting supports wildcards in the place of a host, path, query, or fragment in the URL.

The doc says then:

(Static) Specifies the read-only URL repositories that snapshots can be restored from.

And then the description of "static" is:

Static settings can only be configured on an unstarted or shut down node using elasticsearch.yml.

Static settings must be set on every relevant node in the cluster.

So you must edit elasticsearch.yml on all nodes and restart your nodes.

1 Like

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