# Location \[\*\*\*\*\] doesn't match any of the locations specified by path.repo because this setting is empty

**URL:** <https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579>\
**Category:** Elasticsearch\
**Created:** [January 7, 2016, 8:39am UTC](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579 "2016-01-07T08:39:07Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcmga](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@marcmga](https://discuss.elastic.co/u/marcmga)\
**Post date:** [January 7, 2016, 8:39am UTC](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579/1 "2016-01-07T08:39:08Z")

</div>

Hello there,

I'm trying to make backups of nodes in my elasticsearch. I've folowed [Snapshot module | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html)

However, i'm not able to make it works, it seems to be a problem with repo.path that is not defined, as the topic shows.

in my /etc/elasticsearch/elasticsearch.yml i added:  
path.repo:/var/backups

/var/backups is a mount shared folder on another server.

So, when i try to start elasticsearch with this new config, it doesn't start.  
if i get the status of the service i says:

> Active: failed (Result: exit-code) since jue 2016-01-07 09:31:06 CET; 3s ago  
> Docs: [http://www.elastic.co](http://www.elastic.co)  
> Process: 14056 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -Des.pidfile=${PID\_DIR}/elasticsearch.pid -Des.default.path.home=${ES\_HOME} -Des.default.path.logs=${LOG\_DIR} -Des.default.path.data=${DATA\_DIR} -Des.default.path.conf=${CONF\_DIR} (code=exited, status=1/FAILURE)  
> Process: 14054 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)  
> Main PID: 14056 (code=exited, status=1/FAILURE)

I don't know how to define path.repo

Any procedure on how to get it working?

My environment is a debian jessie, and elasticsearch 2.0

Thank you

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 7, 2016, 8:46am UTC](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579/2 "2016-01-07T08:46:42Z")

</div>

That doesn't look like an ES log, can you check `/var/log/elasticsearch/`.

---

<div class="post-metadata">

**Author:** ![marcmga](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@marcmga](https://discuss.elastic.co/u/marcmga)\
**Post date:** [January 7, 2016, 8:55am UTC](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579/3 "2016-01-07T08:55:59Z")

</div>

Yes, that's the /etc/init.d/elasticsearch status output

if i check the log, actually is the same:

> 1. Error injecting constructor, RepositoryException[[logs] location [\*\*\*\*] doesn't match any of the locations specified by path.repo because this setting is empty]  
> at org.elasticsearch.repositories.fs.FsRepository.(Unknown Source)  
> while locating org.elasticsearch.repositories.fs.FsRepository  
> while locating org.elasticsearch.repositories.Repository

> 1 error  
> at org.elasticsearch.common.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:344)  
> at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:178)  
> at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)  
> at org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:137)  
> at org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:56)  
> at org.elasticsearch.repositories.RepositoriesService.createRepositoryHolder(RepositoriesService.java:404)  
> at org.elasticsearch.repositories.RepositoriesService.registerRepository(RepositoriesService.java:368)  
> at org.elasticsearch.repositories.RepositoriesService.access$100(RepositoriesService.java:55)  
> at org.elasticsearch.repositories.RepositoriesService$1.execute(RepositoriesService.java:110)  
> at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:388)  
> at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:225)  
> at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:188)  
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
> at java.lang.Thread.run(Thread.java:745)  
> Caused by: RepositoryException[[logs] location [\*\*\*\*] doesn't match any of the locations specified by path.repo because this setting is empty]  
> at org.elasticsearch.repositories.fs.FsRepository.(FsRepository.java:85)  
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)  
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)  
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)  
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)  
> at org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:56)  
> at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)  
> at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:104)  
> at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:54)  
> at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47)  
> at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:865)  
> at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43)  
> at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:59)  
> at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:46)  
> at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:201)  
> at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)  
> at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:858)  
> at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)  
> at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 7, 2016, 9:07am UTC](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579/4 "2016-01-07T09:07:48Z")

</div>

What does your `elasticsearch.yml` look like? (Make sure you format it if you post it)

---

<div class="post-metadata">

**Author:** ![marcmga](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@marcmga](https://discuss.elastic.co/u/marcmga)\
**Post date:** [January 7, 2016, 9:11am UTC](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579/5 "2016-01-07T09:11:15Z")

</div>

```
# ----------------------------------- Paths ------------------------------------
# Path to directory where to store the data (separate multiple locations by comma):
# path.data: /path/to/data
# Path to log files:
# path.logs: /path/to/logs
path.repo:/var/backups

```

Is it enough for you?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 7, 2016, 9:14am UTC](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579/6 "2016-01-07T09:14:36Z")

</div>

Add a space:

```auto
path.repo: /var/backups

```

---

<div class="post-metadata">

**Author:** ![marcmga](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@marcmga](https://discuss.elastic.co/u/marcmga)\
**Post date:** [January 7, 2016, 9:16am UTC](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579/7 "2016-01-07T09:16:31Z")

</div>

doesn't work either.

The path.repo is where i want to put the snapshot?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 7, 2016, 9:37am UTC](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579/8 "2016-01-07T09:37:34Z")

</div>

So it does not start at all?

I mean: is elasticsearch running?  
If not, could you upload on [gist.github.com](http://gist.github.com) the full logs and the full `elasticsearch.yml`?

---

<div class="post-metadata">

**Author:** ![marcmga](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@marcmga](https://discuss.elastic.co/u/marcmga)\
**Post date:** [January 7, 2016, 10:14am UTC](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579/9 "2016-01-07T10:14:29Z")

</div>

It does not start at all.

I copied information you asked about.

> <https://gist.github.com/anonymous/920734d826ce4b05dce3>

Thanks

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 7, 2016, 10:28am UTC](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579/10 "2016-01-07T10:28:26Z")

</div>

Elasticsearch started:

```auto
[2016-01-07 10:15:04,857][INFO][node] [Utilizado para logs de servidores] started

```

But you have an issue with your shared folder.

It's really clear that it's an access exception:

```auto
Caused by: java.nio.file.AccessDeniedException: /var/backups

```

Are you using NFS? Can you check the attributes of `/var/backups`?

---

<div class="post-metadata">

**Author:** ![marcmga](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@marcmga](https://discuss.elastic.co/u/marcmga)\
**Post date:** [January 7, 2016, 12:23pm UTC](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579/11 "2016-01-07T12:23:03Z")

</div>

I mount this folder with fstab file and cifs

I have permisions to read and write, but i'm not usre if elasticsearch has permisions. I cannot change permisions on ES server because is a shared folder from a windows server.

What's the best way to use nfs to make snapshots on ES?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 7, 2016, 12:39pm UTC](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579/12 "2016-01-07T12:39:58Z")

</div>

Your elasticsearch user which runs elasticsearch needs to be able to read and write to this data dir.

Can you try it from the ES Server?

---

<div class="post-metadata">

**Author:** ![marcmga](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@marcmga](https://discuss.elastic.co/u/marcmga)\
**Post date:** [January 7, 2016, 1:49pm UTC](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579/13 "2016-01-07T13:49:19Z")

</div>

Hi dadoonet,

I created another nfs folder, with full permisions, like this elasticsearch user is able to write.  
The problem i got has desappeared, but now i get this one, when i try to create the container:

> {"error":{"root\_cause":[{"type":"exception","reason":"failed to create blob container"}],"type":"exception","reason":"failed to create blob container","caused\_by":{"type":"access\_denied\_exception","reason":"/var/snapshots/tests-lsQAs\_eIQWahVAqhdrQHGw"}},"status":500}

It looks like a permission error, however i think it has rights.

Any ideas?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 8, 2016, 9:23am UTC](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579/14 "2016-01-08T09:23:33Z")

</div>

I wonder if it's the same issue as [https://github.com/elastic/elasticsearch/issues/14298](https://github.com/elastic/elasticsearch/issues/14298)

IIRC there might be some concerns using NFS with Snapshot and Restore but may be @Igor_Motov could tell more?

---

<div class="post-metadata">

**Author:** ![marcmga](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@marcmga](https://discuss.elastic.co/u/marcmga)\
**Post date:** [January 8, 2016, 12:38pm UTC](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579/15 "2016-01-08T12:38:33Z")

</div>

Hi there,

Thanks dadoonet and all others for your support.  
Finally i fixed it.

I created a new shared folder, i give full permision to elasticsearch user, i mounted the folder in my ES cluster with this statement:

> mount -t cifs -o dir\_mode=0764,uid=,gid=,username=,password= //IP/sharedfolder /folder/to/mount

Note that i left empty the fields, but it must be fullfill.

Thanks

---

<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:** [July 5, 2017, 11:26pm UTC](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579/16 "2017-07-05T23:26:04Z")

</div>


