# Path.repo is empty

**URL:** <https://discuss.elastic.co/t/path-repo-is-empty/25166>\
**Category:** Elasticsearch\
**Created:** [July 8, 2015, 3:56pm UTC](https://discuss.elastic.co/t/path-repo-is-empty/25166 "2015-07-08T15:56:19Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulz](https://avatars.discourse-cdn.com/v4/letter/p/cdc98d/32.png) [@paulz](https://discuss.elastic.co/u/paulz)\
**Post date:** [July 8, 2015, 3:56pm UTC](https://discuss.elastic.co/t/path-repo-is-empty/25166/1 "2015-07-08T15:56:20Z")

</div>

I try to create a snapshot and so I try to create repository at first.

But when I try

> PUT /\_snapshot/es\_backup\_basic  
> {  
> "type": "fs",  
> "settings": {  
> "location": "/backup/es\_backup\_basic"  
> }  
> }

I get an error about

> 

{  
"error": "RepositoryException[[es\_backup\_basic] failed to create repository]; nested: CreationException[Guice creation errors:\n\n1) Error injecting constructor, org.elasticsearch.repositories.RepositoryException: [es\_backup\_basic] location [/backup/es\_backup\_basic] doesn't match any of the locations specified by path.repo because this setting is empty\n at org.elasticsearch.repositories.fs.FsRepository.(Unknown Source)\n while locating org.elasticsearch.repositories.fs.FsRepository\n while locating org.elasticsearch.repositories.Repository\n\n1 error]; nested: RepositoryException[[es\_backup\_basic] location [/backup/es\_backup\_basic] doesn't match any of the locations specified by path.repo because this setting is empty]; ",  
"status": 500  
}

So it seems that repo.path is not defined...  
But the problem is that I have this option in my elasticsearch.yml :

> grep path.repo /etc/elasticsearch/elasticsearch.yml  
> path.repo: /backup/es\_backup\_basic

The ES server installed on Ubuntu 14.04  
And it's ES 1.6 :

> dpkg -l| grep elast  
> ii elasticsearch 1.6.0 all Open Source, Distributed, RESTful Search Engine

Could somebody give a help?

Thank you in advance...

Thanks, PaulZ

---

<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:** [July 8, 2015, 10:25pm UTC](https://discuss.elastic.co/t/path-repo-is-empty/25166/2 "2015-07-08T22:25:34Z")

</div>

Try `path.repo: ["/backup/es_backup_basic"]`.

---

<div class="post-metadata">

**Author:** ![paulz](https://avatars.discourse-cdn.com/v4/letter/p/cdc98d/32.png) [@paulz](https://discuss.elastic.co/u/paulz)\
**Post date:** [July 9, 2015, 9:11am UTC](https://discuss.elastic.co/t/path-repo-is-empty/25166/3 "2015-07-09T09:11:57Z")

</div>

Thank you, warkolm...

But I've tried already this syntaxe and it does not work as well.

There are another two strange things that I should mention.

1. when I do  
localhost:9200/\_nodes/?pretty  
I could see my ES config, and indeed path.repo is absent in the conf :

> "path" : {  
> "data" : "/var/lib/elasticsearch",  
> "work" : "/tmp/elasticsearch",  
> "home" : "/usr/share/elasticsearch",  
> "conf" : "/etc/elasticsearch",  
> "logs" : "/var/log/elasticsearch"  
> }

But the config settings is correct :

> ```
> "config" : "/etc/elasticsearch/elasticsearch.yml",
> 
> ```

So, why ES does not read path.repo settings?

1. In Ubuntu there is also /etc/default/elasticsearch file...  
But all of settings in this file are commented, and there aren't settings for path.repo

---

<div class="post-metadata">

**Author:** ![paulz](https://avatars.discourse-cdn.com/v4/letter/p/cdc98d/32.png) [@paulz](https://discuss.elastic.co/u/paulz)\
**Post date:** [July 9, 2015, 1:43pm UTC](https://discuss.elastic.co/t/path-repo-is-empty/25166/4 "2015-07-09T13:43:33Z")

</div>

Ok. Finally I found there was a problem...

In Ubuntu the elasticsearch directory configured directly in init script /etc/init.d/elasticsearch and then laucnhed via DAEMON\_OPTS like :

> DAEMON\_OPTS="-d -p $PID\_FILE --default.config=$CONF\_FILE --default.path.home=$ES\_HOME --default.path.logs=$LOG\_DIR --default.path.data=$DATA\_DIR --default.path.work=$WORK\_DIR --default.path.conf=$CONF\_DIR"

So for the moment I could fix the problem adding :

> REPO\_DIR=/backup/es\_backup\_basic

and

> DAEMON\_OPTS="-d -p $PID\_FILE --default.config=$CONF\_FILE --default.path.home=$ES\_HOME --default.path.logs=$LOG\_DIR --default.path.data=$DATA\_DIR --default.path.work=$WORK\_DIR --default.path.conf=$CONF\_DIR--default.path.repo=$REPO\_DIR "

It solved the problem... even it's not normal for me that ES does not get sense of /etc/elasticsearch/elasticsearch.yml settings.

---

<div class="post-metadata">

**Author:** ![tarunsapra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tarunsapra/32/3903_2.png) [@tarunsapra](https://discuss.elastic.co/u/tarunsapra)\
**Post date:** [September 10, 2015, 12:37pm UTC](https://discuss.elastic.co/t/path-repo-is-empty/25166/5 "2015-09-10T12:37:06Z")

</div>

> [@warkolm](#):
>
> path.repo: ["/backup/es\_backup\_basic"]

It would be nice if this can be made part of the documentation.

---

<div class="post-metadata">

**Author:** ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)\
**Post date:** [September 10, 2015, 1:10pm UTC](https://discuss.elastic.co/t/path-repo-is-empty/25166/6 "2015-09-10T13:10:01Z")

</div>

This is already documented here: [https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html#\_shared\_file\_system\_repository](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html#_shared_file_system_repository)

---

<div class="post-metadata">

**Author:** ![paulz](https://avatars.discourse-cdn.com/v4/letter/p/cdc98d/32.png) [@paulz](https://discuss.elastic.co/u/paulz)\
**Post date:** [September 10, 2015, 1:29pm UTC](https://discuss.elastic.co/t/path-repo-is-empty/25166/7 "2015-09-10T13:29:29Z")

</div>

And does it documented that it does not work as I described in my solution for the problem?

---

<div class="post-metadata">

**Author:** ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)\
**Post date:** [September 10, 2015, 1:33pm UTC](https://discuss.elastic.co/t/path-repo-is-empty/25166/8 "2015-09-10T13:33:04Z")

</div>

@paulz sorry, I think I mis understood the comment from @tarunsapra. I read it as an ask for the `path.repo` variable to be documented which has already been done. I didn't realise that there was extra information that might need to be added to this. Feel free to submit a PR for the documentation if you think it could benefit form extra information

---

<div class="post-metadata">

**Author:** ![paulz](https://avatars.discourse-cdn.com/v4/letter/p/cdc98d/32.png) [@paulz](https://discuss.elastic.co/u/paulz)\
**Post date:** [September 10, 2015, 2:03pm UTC](https://discuss.elastic.co/t/path-repo-is-empty/25166/9 "2015-09-10T14:03:23Z")

</div>

@colings86 I'm sorry too.  
In fact I was a little bit sarcastic in my reply. It's because I have found the solution myself, but nobody explain me why it did not work in a standard way...  
I think that there is some problem with my install, but I could not find what is wrong and why path.repo: ["/backup/es\_backup\_basic"] setting does not work.

The setting about path.repo is already in documentation, I confirm  
My hint to set it in options for DAEMON... I do not think it deserves to be in the official doc. It probably just a little hint.

I'm sorry again to be a in my sarcastic mood...

---

<div class="post-metadata">

**Author:** ![abhijitdeka11](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@abhijitdeka11](https://discuss.elastic.co/u/abhijitdeka11)\
**Post date:** [December 17, 2015, 12:52pm UTC](https://discuss.elastic.co/t/path-repo-is-empty/25166/10 "2015-12-17T12:52:30Z")

</div>

I have the same issue in my setup.I tried your suggestions but it is still not working.  
Any idea?

---

<div class="post-metadata">

**Author:** ![Hilal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hilal/32/7684_2.png) [@Hilal](https://discuss.elastic.co/u/Hilal)\
**Post date:** [January 4, 2016, 1:05pm UTC](https://discuss.elastic.co/t/path-repo-is-empty/25166/11 "2016-01-04T13:05:44Z")

</div>

I have same problem:  
RepositoryException[[es\_backup\_basic] location [/backup/es\_backup\_basic]  
doesn't match any of the locations specified by path.repo because this  
setting is empty]; ",  
"status": 500

But ı am using centos . My /etc/init.d codes:

REPO\_DIR="/backup/my\_backup"  
and  
daemon --user $ES\_USER --pidfile $pidfile $exec -p $pidfile -d -Des.default.path.home=$ES\_HOME -Des.default.path.logs=$LOG\_DIR -Des.default.path.data=$DATA\_DIR -Des.default.path.conf=$CONF\_DIR-Des.default.path.repo=$REPO\_DIR "  
It is true?  
Can you help me please?

---

<div class="post-metadata">

**Author:** ![Hilal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hilal/32/7684_2.png) [@Hilal](https://discuss.elastic.co/u/Hilal)\
**Post date:** [January 5, 2016, 7:36am UTC](https://discuss.elastic.co/t/path-repo-is-empty/25166/12 "2016-01-05T07:36:31Z")

</div>

Hi,

I tried this solution and it has solved this problem but my new error is:

{  
"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": "/backup/my\_backup/tests-Qzn-aEpfTSKsBIgfyVwbtw"  
}  
},  
"status": 500  
}

---

<div class="post-metadata">

**Author:** ![Hilal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hilal/32/7684_2.png) [@Hilal](https://discuss.elastic.co/u/Hilal)\
**Post date:** [January 5, 2016, 9:24am UTC](https://discuss.elastic.co/t/path-repo-is-empty/25166/13 "2016-01-05T09:24:25Z")

</div>

Hi,  
I am using centos so I give permission to file. After result is correct.

permission to file:  
Open the terminal in the backup file and please write permission commands. for example:

chmod u+w backup  
chmod u+r backup  
chmod u+x backup etc.

---

<div class="post-metadata">

**Author:** ![Ganesh2303](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Ganesh2303](https://discuss.elastic.co/u/Ganesh2303)\
**Post date:** [February 11, 2016, 12:15pm UTC](https://discuss.elastic.co/t/path-repo-is-empty/25166/14 "2016-02-11T12:15:21Z")

</div>

HI,  
Im also facing same erroe even i have applied the path.repo in my elasticsearch.yml and its showing same error. Anyone help me to come out of it.

---

<div class="post-metadata">

**Author:** ![maziyar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maziyar/32/18423_2.png) [@maziyar](https://discuss.elastic.co/u/maziyar)\
**Post date:** [March 29, 2016, 10:04pm UTC](https://discuss.elastic.co/t/path-repo-is-empty/25166/15 "2016-03-29T22:04:53Z")

</div>

Here's how I did it. My situation is a bit different, each node is a KVM machine so at the end the NFS was written by kvm user and I gave it chmod 777 to make this happen.

I added path.repo in each node yml file

> /etc/elasticsearch/elasticsearch.yml (Ubuntu 14.04):  
> path.repo: /home/maziyar/backup/

Restarted each node one by one. Then I mounted the nfs (password-less SSH but doesn't matter)

> 10.0.0.1:/data/ /home/maziyar/backup/ nfs soft,intr,rsize=8192,wsize=8192,noauto

I used kopf plugin to create a repository then took a snapshot. Worked fine!

ES: Elasticsearch 2.2.1

---

<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:04pm UTC](https://discuss.elastic.co/t/path-repo-is-empty/25166/16 "2017-07-05T23:04:13Z")

</div>


