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

Hello there,

I'm trying to make backups of nodes in my elasticsearch. I've folowed Snapshot module | Elasticsearch Guide [8.11] | Elastic

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
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

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

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)

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

# ----------------------------------- 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?

Add a space:

path.repo: /var/backups

doesn't work either.

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

So it does not start at all?

I mean: is elasticsearch running?
If not, could you upload on gist.github.com the full logs and the full elasticsearch.yml?

It does not start at all.

I copied information you asked about.

Thanks

Elasticsearch started:

[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:

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

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

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?

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?

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?

I wonder if it's the same issue as 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?

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