# Snapshots transport error from python

**URL:** <https://discuss.elastic.co/t/snapshots-transport-error-from-python/71033>\
**Category:** Elasticsearch\
**Created:** [January 10, 2017, 7:51am UTC](https://discuss.elastic.co/t/snapshots-transport-error-from-python/71033 "2017-01-10T07:51:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Medhamsh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/medhamsh/32/14420_2.png) [@Medhamsh](https://discuss.elastic.co/u/Medhamsh)\
**Post date:** [January 10, 2017, 7:51am UTC](https://discuss.elastic.co/t/snapshots-transport-error-from-python/71033/1 "2017-01-10T07:51:43Z")

</div>

The idea here is to take snapshots of all the indices at any given point of time. We have a python program which triggers the snapshot creation on the elasticsearch nodes. To keep all this simple, I am just trying in the repl shell to create a repository and it fails with the error saying a reference to empty path repo in the config/elasticsearch.yml. In reality this is not true and we have a configuration of path.repo in the configuration yml.

`path.repo: ["/usr/share/elasticsearch/data/backups"]`  
I also tried setting the path repo as single entry rather than the list of a single element.

`path.repo: "/usr/share/elasticsearch/data/backups"`  
This path repo is also effective. I have verified by doing a GET/\_nodes/settings.

```
"name": "es-cluster-name"
   },
   "node": {
       "name": "es-cluster-name_elasticsearch_2",
       "path": {
           "repo": [
               "/usr/share/elasticsearch/data/backups"
           ]
       }
   },
   "path": {
       "logs": "/usr/share/elasticsearch/logs",
       "home": "/usr/share/elasticsearch"

```

This is present for every node. The filesystem also has the directory present at /usr/share/elasticsearch/data/backups.

When I try to create the the repository this is what i get.

```
>>> data = {
... "type": "fs",
... "settings": {
... "compress": "true",
... "location": "/usr/share/elasticsearch/data/backups",
... }
... }
>>> es.snapshot.create_repository('test', body=data)
PUT http://lb-elasticsearch:9200/_snapshot/test [status:500 request:1.255s]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
elasticsearch.exceptions.TransportError: TransportError(500, 'repository_exception', "[test] location [/usr/share/elasticsearch/data/backups] doesn't match any of the locations specified by path.repo because this setting is empty")

```

Here I trimmed the unnecessary trace. Following are the logs from console.

```
0:20:411) Error injecting constructor, RepositoryException[[test] location [/usr/share/elasticsearch/data/backups] doesn't match any of the locations specified by path.repo because this setting is empty]
10/01/2017 00:20:41 at org.elasticsearch.repositories.fs.FsRepository.<init>(Unknown Source)
10/01/2017 00:20:41 while locating org.elasticsearch.repositories.fs.FsRepository
10/01/2017 00:20:41 while locating org.elasticsearch.repositories.Repository
10/01/2017 00:20:41
10/01/2017 00:20:411 error]; nested: RepositoryException[[test] location [/usr/share/elasticsearch/data/backups] doesn't match any of the locations specified by path.repo because this setting is empty];
10/01/2017 00:20:41 at org.elasticsearch.common.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:360)
10/01/2017 00:20:41 at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:178)
10/01/2017 00:20:41 at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
10/01/2017 00:20:41 at org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:154)
10/01/2017 00:20:41 at org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:55)
10/01/2017 00:20:41 at org.elasticsearch.repositories.RepositoriesService.createRepositoryHolder(RepositoriesService.java:404)
10/01/2017 00:20:41 ... 11 more

```

With all this. I am unable to find the route of troubleshooting this scenario.

Thanks in advance. All this setup is in docker inside rancher.

---

<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:** [February 7, 2017, 7:52am UTC](https://discuss.elastic.co/t/snapshots-transport-error-from-python/71033/2 "2017-02-07T07:52:06Z")

</div>

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