Error while creating elasticsearch Azure repository for snapshot and restore


(ganeshbabu) #1

Hi All,

I want to take snapshot and restore using azure repository in Linux, I have configured these below setting in yml,

cloud:
    azure:
        storage:
            my_account:
                account: https://devesrepo.blob.core.windows.net/
                key: KEY

with the above setting, service is started, but i m getting below error when creating repository in Elasticsearch 2.4.0,

PUT _snapshot/my_backup
{
    "type": "azure"
}

Error msg:-

{
   "error": {
      "root_cause": [
         {
            "type": "repository_exception",
            "reason": "[elasticsearch-snapshots] Can not find an azure client for account [null]"
         }
      ],
      "type": "repository_exception",
      "reason": "[elasticsearch-snapshots] Can not find an azure client for account [null]"
   },
   "status": 500
}

When I looked into the ES logs I could see cloud storage account not getting created at the start of elasticsearch

2016-09-22 07:30:23,221][INFO ][http                     ] [mue2rhegrdd002_RD_NDX_MASTER] publish_address {10.247.0.4:9200}, bound_addresses {10.247.0.4:9200}
[2016-09-22 07:30:23,221][INFO ][node                     ] [mue2rhegrdd002_RD_NDX_MASTER] started
[2016-09-22 07:30:23,258][INFO ][cluster.service          ] [mue2rhegrdd002_RD_NDX_MASTER] new_master {mue2rhegrdd002_RD_NDX_MASTER}{-mRr-uLKQkyEJwfqLLI_2Q}{10.247.0.4}{10.247.0.4:9300}{data=false, max_local_storage_nodes=1, master=true}, added {{mue2rhegrdd001_RD_NDX_DATA}{O-JSVOlMQXCuwb5nf5XheQ}{10.247.0.5}{10.247.0.5:9260}{max_local_storage_nodes=1, master=false},{mue2rhegrdd001_RD_NDX_MASTER}{DMAPO7O6QEuXmcsP6aGuAQ}{10.247.0.5}{10.247.0.5:9300}{data=false, max_local_storage_nodes=1, master=true},}, reason: zen-disco-join(elected_as_master, [1] joins received)
[2016-09-22 07:30:24,576][ERROR][cloud.azure.storage      ] [mue2rhegrdd002_RD_NDX_MASTER] can not create azure storage client: Primary and secondary location URIs in a StorageUri must point to the same resource.
[2016-09-22 07:30:24,589][INFO ][watcher                  ] [mue2rhegrdd002_RD_NDX_MASTER] starting watch service...
[2016-09-22 07:30:24,590][INFO ][watcher                  ] [mue2rhegrdd002_RD_NDX_MASTER] watch service has started
[2016-09-22 07:30:24,631][INFO ][license.plugin.core      ] [mue2rhegrdd002_RD_NDX_MASTER] license [cf8a2152-4f41-4739-8459-4137cac8105b] - valid
[2016-09-22 07:30:25,489][INFO ][gateway                  ] [mue2rhegrdd002_RD_NDX_MASTER] recovered [20] indices into cluster_state
[2016-09-22 07:30:26,021][INFO ][http                     ] [mue2rhegrdd002_RD_NDX_DATA] publish_address {10.247.0.4:9240}, bound_addresses {10.247.0.4:9240}
[2016-09-22 07:30:26,021][INFO ][node                     ] [mue2rhegrdd002_RD_NDX_DATA] started
[2016-09-22 07:30:26,622][INFO ][cluster.service          ] [mue2rhegrdd002_RD_NDX_MASTER] added {{mue2rhegrdd002_RD_NDX_DATA}{eE1n1iLMQom6VEgYfBwJ9g}{10.247.0.4}{10.247.0.4:9260}{max_local_storage_nodes=1, master=false},}, reason: zen-disco-join(join from node[{mue2rhegrdd002_RD_NDX_DATA}{eE1n1iLMQom6VEgYfBwJ9g}{10.247.0.4}{10.247.0.4:9260}{max_local_storage_nodes=1, master=false}])
[2016-09-22 07:30:26,678][INFO ][cluster.service          ] [mue2rhegrdd002_RD_NDX_DATA] detected_master {mue2rhegrdd002_RD_NDX_MASTER}{-mRr-uLKQkyEJwfqLLI_2Q}{10.247.0.4}{10.247.0.4:9300}{data=false, max_local_storage_nodes=1, master=true}, added {{mue2rhegrdd001_RD_NDX_DATA}{O-JSVOlMQXCuwb5nf5XheQ}{10.247.0.5}{10.247.0.5:9260}{max_local_storage_nodes=1, master=false},{mue2rhegrdd001_RD_NDX_MASTER}{DMAPO7O6QEuXmcsP6aGuAQ}{10.247.0.5}{10.247.0.5:9300}{data=false, max_local_storage_nodes=1, master=true},{mue2rhegrdd002_RD_NDX_MASTER}{-mRr-uLKQkyEJwfqLLI_2Q}{10.247.0.4}{10.247.0.4:9300}{data=false, max_local_storage_nodes=1, master=true},}, reason: zen-disco-receive(from master [{mue2rhegrdd002_RD_NDX_MASTER}{-mRr-uLKQkyEJwfqLLI_2Q}{10.247.0.4}{10.247.0.4:9300}{data=false, max_local_storage_nodes=1, master=true}])
[2016-09-22 07:30:26,711][ERROR][cloud.azure.storage      ] [mue2rhegrdd002_RD_NDX_DATA] can not create azure storage client: Primary and secondary location URIs in a StorageUri must point to the same resource.
[2016-09-22 07:30:26,764][INFO ][license.plugin.core      ] [mue2rhegrdd002_RD_NDX_DATA] license [cf8a2152-4f41-4739-8459-4137cac8105b] - valid

Please let us know your suggestions to resolve this.

Thanks,
Ganeshbabu R


(David Pilato) #2

I answered on the Github issue.

The problem is that we are currently swallowing the original exception.

For the record the problem here is that the right configuration should be:

cloud:
  azure:
    storage:
      my_account:
        account: devesrepo
        key: KEY

(system) #3