# Impossible to create Repository for a snapshot : location \[...\] doesn't match any of the locations specified by path.repo because this setting is empty

**URL:** <https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228>\
**Category:** Elasticsearch\
**Created:** [December 5, 2017, 12:36am UTC](https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228 "2017-12-05T00:36:42Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![elastic\_mostafa](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@elastic\_mostafa](https://discuss.elastic.co/u/elastic_mostafa)\
**Post date:** [December 5, 2017, 12:36am UTC](https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228/1 "2017-12-05T00:36:42Z")

</div>

Okey let me start from the beginning ,

I created this directory : /home/mostafa/public\_html/ES\_repository  
I added `path.repo: ["/mount/backups"]` to the elasticsearch.yml a the end of file then I saved that file  
after : curl -XPUT 'localhost:9200/\_snapshot/my\_fs\_backup?pretty' -H 'Content-Type: application/json' -d'  
{  
"type": "fs",  
"settings": {  
"location": "/home/mostafa/public\_html/ES\_repository/"  
}  
}  
'

there is Two problems :  
1- it returns me this error message :

> [my\_fs\_backup] location [/home/mostafa/public\_html/ES\_repository/] doesn't match any of the locations specified by path.repo because this setting is empty

2- when I restart elastic service it gives me this error message :

> Starting elasticsearch: [FAILED]  
> and to start the service I must remove the path.repo line from the elasticsearch.yml otherwise it will not restarted

---

<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:** [December 5, 2017, 12:56am UTC](https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228/2 "2017-12-05T00:56:27Z")

</div>

But `path.repo` should be something like:

```auto
path.repo: ["/home/mostafa/public_html/ES_repository"]

```

No?

---

<div class="post-metadata">

**Author:** ![elastic\_mostafa](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@elastic\_mostafa](https://discuss.elastic.co/u/elastic_mostafa)\
**Post date:** [December 5, 2017, 2:39am UTC](https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228/3 "2017-12-05T02:39:47Z")

</div>

> [@elastic\_mostafa](#):
>
> curl -XPUT 'localhost:9200/\_snapshot/my\_fs\_backup?pretty' -H 'Content-Type: application/json' -d'
> 
> {
> 
> "type": "fs",
> 
> "settings": {
> 
> "location": "/home/mostafa/public\_html/ES\_repository/"
> 
> }
> 
> }
> 
> '

hello thanks for answer , I tried :  
path.repo: ["/home/mostafa/public\_html/ES\_repository"]  
and  
path.repo: [/home/mostafa/public\_html/ES\_repository]  
and  
path.repo: /home/mostafa/public\_html/ES\_repository  
nothing works unfortunately  
...

---

<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:** [December 5, 2017, 4:27am UTC](https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228/4 "2017-12-05T04:27:50Z")

</div>

What is the error message in this case? I think it should be different. Unless you did not restart the node.

If you have multiple nodes, you must do that on all machines

---

<div class="post-metadata">

**Author:** ![elastic\_mostafa](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@elastic\_mostafa](https://discuss.elastic.co/u/elastic_mostafa)\
**Post date:** [December 5, 2017, 11:36am UTC](https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228/5 "2017-12-05T11:36:35Z")

</div>

the problem in this case when I add path.repo is : when I restart elasticsearch it gives me FAILED (in start after stop)

---

<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:** [December 5, 2017, 12:53pm UTC](https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228/6 "2017-12-05T12:53:31Z")

</div>

What are the logs in that case?  
Can you share exactly what you wrote in `elasticsearch.yml`? I mean copy and paste here using the following to format it:

````
```
Your content here
```
````

---

<div class="post-metadata">

**Author:** ![elastic\_mostafa](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@elastic\_mostafa](https://discuss.elastic.co/u/elastic_mostafa)\
**Post date:** [December 5, 2017, 2:23pm UTC](https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228/7 "2017-12-05T14:23:52Z")

</div>

Hello , here is the content of my YML , as you can see there is no path.respo because if I add it the server cannot be restarted

```auto
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
#network.host: 192.168.0.1
#
# Set a custom port for HTTP:
#
# Set a custom port for HTTP:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.zen.ping.unicast.hosts: ["host1", "host2"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
#
#discovery.zen.minimum_master_nodes: 3
#
# For more information, consult the zen discovery module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true

```

---

<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:** [December 5, 2017, 4:27pm UTC](https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228/8 "2017-12-05T16:27:07Z")

</div>

Please provide the one which fails when you start.  
And logs if any.

---

<div class="post-metadata">

**Author:** ![elastic\_mostafa](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@elastic\_mostafa](https://discuss.elastic.co/u/elastic_mostafa)\
**Post date:** [December 5, 2017, 6:04pm UTC](https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228/9 "2017-12-05T18:04:49Z")

</div>

here is the current yml content

```auto
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
#network.host: 192.168.0.1
#
# Set a custom port for HTTP:
#
# Set a custom port for HTTP:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.zen.ping.unicast.hosts: ["host1", "host2"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
#
#discovery.zen.minimum_master_nodes: 3
#
# For more information, consult the zen discovery module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
path.repo: ["/home/mostafa/public_html/ES_repository"]

```

after this I did:

```auto
[elasticsearch]# sudo service elasticsearch restart
and the result was : 
Stopping elasticsearch: [OK]
Starting elasticsearch: [FAILED]

```

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:** [December 5, 2017, 6:12pm UTC](https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228/10 "2017-12-05T18:12:24Z")

</div>

Can you share the elasticsearch logs please?

They should be in `/var/log/elasticsearch`.

Not sure it changes anything but could you try to write the following `elasticsearch.yml` file:

```auto
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
path.repo: ["/home/mostafa/public_html/ES_repository"]

```

---

<div class="post-metadata">

**Author:** ![elastic\_mostafa](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@elastic\_mostafa](https://discuss.elastic.co/u/elastic_mostafa)\
**Post date:** [December 5, 2017, 9:54pm UTC](https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228/11 "2017-12-05T21:54:35Z")

</div>

now after adding :  
path.data: /var/lib/elasticsearch  
path.logs: /var/log/elasticsearch  
path.repo: ["/home/mostafa/public\_html/ES\_repository"]

i have this error message :

```auto
[elasticsearch]# service elasticsearch start
Starting elasticsearch: Exception in thread "main" 2017-12-05 15:44:47,620 main ERROR No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'log4j2.debug' to show Log4j2 internal initialization logging.
SettingsException[Failed to load settings from /etc/elasticsearch/elasticsearch.yml]; nested: JsonParseException[Duplicate field 'path.data'
 at [Source: # ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
#network.host: 192.168.0.1
#
# Set a custom port for HTTP:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.zen.ping.unicast.hosts: ["host1", "host2"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
#
#discovery.zen.minimum_master_nodes: 3
#
# For more information, consult the zen discovery module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
path.repo: ["/home/mostafa/public_html/ES_repository"]
; line: 89, column: 10]];
        at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:101)
        at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:78)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:69)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134)
        at org.elasticsearch.cli.Command.main(Command.java:90)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85)
Caused by: com.fasterxml.jackson.core.JsonParseException: Duplicate field 'path.data'
 at [Source: # ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
                                   

```

---

<div class="post-metadata">

**Author:** ![elastic\_mostafa](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@elastic\_mostafa](https://discuss.elastic.co/u/elastic_mostafa)\
**Post date:** [December 5, 2017, 9:57pm UTC](https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228/12 "2017-12-05T21:57:32Z")

</div>

```auto
 #
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
#network.host: 192.168.0.1
#
# Set a custom port for HTTP:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.zen.ping.unicast.hosts: ["host1", "host2"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
#
#discovery.zen.minimum_master_nodes: 3
#
# For more information, consult the zen discovery module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
path.repo: ["/home/mostafa/public_html/ES_repository"]
; line: 89, column: 10]
        at com.fasterxml.jackson.core.json.JsonReadContext._checkDup(JsonReadContext.java:204)
        at com.fasterxml.jackson.core.json.JsonReadContext.setCurrentName(JsonReadContext.java:198)
        at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:372)
        at org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:52)
        at org.elasticsearch.common.settings.loader.XContentSettingsLoader.serializeObject(XContentSettingsLoader.java:105)
        at org.elasticsearch.common.settings.loader.XContentSettingsLoader.load(XContentSettingsLoader.java:75)
        at org.elasticsearch.common.settings.loader.XContentSettingsLoader.load(XContentSettingsLoader.java:52)
        at org.elasticsearch.common.settings.loader.YamlSettingsLoader.load(YamlSettingsLoader.java:50)
        at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1069)
        at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1058)
        at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:99)
        ... 6 more
                                                           [FAILED]
 

```

---

<div class="post-metadata">

**Author:** ![elastic\_mostafa](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@elastic\_mostafa](https://discuss.elastic.co/u/elastic_mostafa)\
**Post date:** [December 5, 2017, 9:59pm UTC](https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228/13 "2017-12-05T21:59:17Z")

</div>

here is the elasticsearch.log

```auto
[2017-12-05T12:01:13,040][INFO][o.e.n.Node] [mvjMkN_] stopping ...
[2017-12-05T12:01:13,430][INFO][o.e.n.Node] [mvjMkN_] stopped
[2017-12-05T12:01:13,431][INFO][o.e.n.Node] [mvjMkN_] closing ...
[2017-12-05T12:01:13,483][INFO][o.e.n.Node] [mvjMkN_] closed
[2017-12-05T12:01:20,404][WARN][o.e.b.Natives] unable to load JNA native support library, native methods will be disable$
java.lang.UnsatisfiedLinkError: /tmp/jna--1985354563/jna1539988118381578937.tmp: /tmp/jna--1985354563/jna1539988118381578937.tmp: fai$
        at java.lang.ClassLoader$NativeLibrary.load(Native Method) ~[?:1.8.0_151]
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) ~[?:1.8.0_151]
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) ~[?:1.8.0_151]
        at java.lang.Runtime.load0(Runtime.java:809) ~[?:1.8.0_151]
        at java.lang.System.load(System.java:1086) ~[?:1.8.0_151]
        at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:947) ~[jna-4.4.0-1.jar:4.4.0 (b0)]
        at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:922) ~[jna-4.4.0-1.jar:4.4.0 (b0)]
        at com.sun.jna.Native.<clinit>(Native.java:190) ~[jna-4.4.0-1.jar:4.4.0 (b0)]
        at java.lang.Class.forName0(Native Method) ~[?:1.8.0_151]
        at java.lang.Class.forName(Class.java:264) ~[?:1.8.0_151]
        at org.elasticsearch.bootstrap.Natives.<clinit>(Natives.java:45) [elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:103) [elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:171) [elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:322) [elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:130) [elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:121) [elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:69) [elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) [elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) [elasticsearch-6.0.0.jar:6.0.0]
[2017-12-05T12:01:20,413][WARN][o.e.b.Natives] cannot check if running as root because JNA is not available
[2017-12-05T12:01:20,414][WARN][o.e.b.Natives] cannot install system call filter because JNA is not available
[2017-12-05T12:01:20,414][WARN][o.e.b.Natives] cannot register console handler because JNA is not available
[2017-12-05T12:01:20,416][WARN][o.e.b.Natives] cannot getrlimit RLIMIT_NPROC because JNA is not available
[2017-12-05T12:01:20,416][WARN][o.e.b.Natives] cannot getrlimit RLIMIT_AS beacuse JNA is not available
[2017-12-05T12:01:20,416][WARN][o.e.b.Natives] cannot getrlimit RLIMIT_FSIZE because JNA is not available
[2017-12-05T12:01:20,507][ERROR][o.e.b.Bootstrap] Exception
java.lang.IllegalStateException: Unable to access 'path.repo' (/home/mostafa/public_html/ES_repository)
        at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:70) ~[elasticsearch-6.0.0.jar:6.$
        at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:303) ~[elasticsearch-6.0.0.jar:6.0.0]

```

---

<div class="post-metadata">

**Author:** ![elastic\_mostafa](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@elastic\_mostafa](https://discuss.elastic.co/u/elastic_mostafa)\
**Post date:** [December 5, 2017, 10:01pm UTC](https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228/14 "2017-12-05T22:01:38Z")

</div>

the rest of elasticsearch.log

```auto

        at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:242) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Security.configure(Security.java:120) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:207) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:322) [elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:130) [elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:121) [elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:69) [elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) [elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) [elasticsearch-6.0.0.jar:6.0.0]
Caused by: java.nio.file.AccessDeniedException: /home/mostafa/public_html/ES_repository
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) ~[?:1.8.0_151]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:1.8.0_151]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:1.8.0_151]
        at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384) ~[?:1.8.0_151]
        at java.nio.file.Files.createDirectory(Files.java:674) ~[?:1.8.0_151]
        at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781) ~[?:1.8.0_151]
        at java.nio.file.Files.createDirectories(Files.java:767) ~[?:1.8.0_151]
        at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:401) ~[elasticsearch-6.0.0.jar:6.0.0]
        at java.nio.file.Files.createDirectories(Files.java:767) ~[?:1.8.0_151]
        at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:401) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:68) ~[elasticsearch-6.0.0.jar:6.$
        ... 12 more
[2017-12-05T12:01:20,513][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: Unable to access 'path.repo' (/home/mostafa/public_htm$
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:134) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:121) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:69) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) ~[elasticsearch-6.0.0.jar:6.0.0]
Caused by: java.lang.IllegalStateException: Unable to access 'path.repo' (/home/mostafa/public_html/ES_repository)
        at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:70) ~[elasticsearch-6.0.0.jar:6.$
        at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:303) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:242) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Security.configure(Security.java:120) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:207) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:322) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:130) ~[elasticsearch-6.0.0.jar:6.0.0]
        ... 6 more
Caused by: java.nio.file.AccessDeniedException: /home/mostafa/public_html/ES_repository
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) ~[?:1.8.0_151]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:1.8.0_151]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:1.8.0_151]
        at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384) ~[?:1.8.0_151]
        at java.nio.file.Files.createDirectory(Files.java:674) ~[?:1.8.0_151]
        at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781) ~[?:1.8.0_151]
        at java.nio.file.Files.createDirectories(Files.java:767) ~[?:1.8.0_151]
        at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:401) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:68) ~[elasticsearch-6.0.0.jar:6.$
        at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:303) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:242) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Security.configure(Security.java:120) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:207) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:322) ~[elasticsearch-6.0.0.jar:6.0.0]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:130) ~[elasticsearch-6.0.0.jar:6.0.0]
        ... 6 more

```

---

<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:** [December 18, 2017, 3:17pm UTC](https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228/15 "2017-12-18T15:17:42Z")

</div>

```auto
Caused by: java.nio.file.AccessDeniedException: /home/mostafa/public_html/ES_repository

```

This seems to indicate that one of the nodes can not access this directory.

---

<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:** [January 15, 2018, 3:17pm UTC](https://discuss.elastic.co/t/impossible-to-create-repository-for-a-snapshot-location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/110228/16 "2018-01-15T15:17:48Z")

</div>

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