Elasticsearch Create a snapshot repository error

When I use
curl -XPUT 'http://192.168.184.33:9200/_snapshot/elkbak' -d '{"type": "fs","settings": {"location": "/data/elk_bak","compress": true}}'.
Shows the following error:
{"error":{"root_cause":[{"type":"repository_verification_exception","reason":"[elkbak] [AvxdLuwDTGCif9MujDW8mw, 'RemoteTransportException[[logserver-es-02][192.168.184.34:9300][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[elkbak] store location [/data/elk_bak] is not accessible on the node [{logserver-es-02}{AvxdLuwDTGCif9MujDW8mw}{192.168.184.34}{192.168.184.34:9300}{master=true}]]; nested: NotSerializableExceptionWrapper[access_denied_exception: /data/elk_bak/tests-UI5DJFuzRLWs2XuQ2SIcgA/data-AvxdLuwDTGCif9MujDW8mw.dat];']]"}],"type":"repository_verification_exception","reason":"[elkbak] [AvxdLuwDTGCif9MujDW8mw, 'RemoteTransportException[[logserver-es-02][192.168.184.34:9300][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[elkbak] store location [/data/elk_bak] is not accessible on the node [{logserver-es-02}{AvxdLuwDTGCif9MujDW8mw}{192.168.184.34}{192.168.184.34:9300}{master=true}]]; nested: NotSerializableExceptionWrapper[access_denied_exception: /data/elk_bak/tests-UI5DJFuzRLWs2XuQ2SIcgA/data-AvxdLuwDTGCif9MujDW8mw.dat];']]"},"status":500}

This is my configuration.
logserver-es-01

cluster.name: my_logsearch
node.name: logserver-es-01
node.master: true
node.data: true
index.number_of_shards: 5
index.number_of_replicas: 1
path.logs: "/data/logs/elasticsearch"
path.data: "/data/elasticsearch"
network.host: 192.168.184.33
http.port: 9200
bootstrap.mlockall: true
transport.tcp.compress: true

discovery.zen.fd.connect_on_network_disconnect : true
discovery.zen.initial_ping_timeout : 10s
discovery.zen.fd.ping_interval : 2s
discovery.zen.fd.ping_retries : 10

network.tcp.keep_alive : true
indices.recovery.max_size_per_sec: 0
indices.recovery.concurrent_streams: 5
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.timeout: 3s
discovery.zen.ping.unicast.hosts: ["logserver-es-01","logserver-es-02"]
path.repo: ["/data/elk_bak"]
logserver-es-02

node.name: logserver-es-02
....
path.repo: ["/data/elk_bak"]

What is the problem, anybody help me. Thank you!

1 Like

Are you sure the directory "/data/elk_bak" is accessible and that the permissions meet the requirements?

The elk_bak permissions:
drwxr-xr-x 3 nobody nobody 4096 Sep 19 14:50 elk_bak
The Elasticsearch process, is to use elasticsearch start. Is this problem?

The repository path must be a shared file system accessible to all nodes in the cluster. is this the case in your setup?

Yes. All the nodes in the cluster mount NFS_Server folder.
NFS_Server:
[root @ localhost conf] # more/etc/exports
/backup 192.168.184.33 (rw, sync, no_root_squash)
/backup 192.168.184.34 (rw, sync, no_root_squash)

Cluster nodes 1

mount -t NFS 192.168.184.19: /backup/data/elk_bak /

Cluster node 2
mount -t NFS 192.168.184.19: /backup/data/elk_bak /

Is the path "/backup/data/elk_bak/" or "/data/elk_bak/"?

Is the path /data/elk_bak/
Cluster nodes 1
mount -t nfs 192.168.184.19:/backup /data/elk_bak/
Cluster nodes 2
mount -t nfs 192.168.184.19:/backup /data/elk_bak/

Cluster nodes 1
elasticsearch.yml
...
path.repo: ["/data/elk_bak"]

Cluster nodes 2
elasticsearch.yml
...
path.repo: ["/data/elk_bak"]

Was there a solution to this? currently running into the same issue?

Is any solution there for this issue, I am running into same issue.

I'm running into the same issue
Is there any solution to this?

Same problem here. Looking into uid and gid right now.

Is there any solution to this ? Running into same issue.

HI Guys,

This issue is solved.

The problem here is the shared directory is not inheriting the permissions for newly created contents. You need to set default acl permission on the shared directory by,

'sudo setfacl -m d:u:elasticsearch:rwx /data/elk_back'

Its Working...

1 Like

this should be in the documentation ! thanks rakeshraagu2