Error when I create a snapshot

Hi everyone !
Before upgrading my stack, I would like to create snapshot of my indices.

My configuration is :
4 nodes (2 master, 2 data)
6.4.2 version

I have created a folder on the network, it's mounted on each node with nfs.

On each node I have this :

df -h
172.21.2.128:/nfs_elk               97G    608K   97G   1% /mnt/snapshot_elk 

In each file elasticsearch.yml, I have this :

path.repo: ["/mnt/snapshot_elk/elk-ludo"]

When I run the command to create the folder, I have this :

 PUT /_snapshot/snapfolder_elkludo
 {
"type": "fs",
"settings": {
    "location": "/mnt/snapshot_elk/elk-ludo/",
    "compress": true
}
}

===>

    {
  "error": {
"root_cause": [
  {
    "type": "repository_verification_exception",
    "reason": "[snapfolder_elkludo] [[bA2LzpSzT4eiHsYcctR1FA, 
	'RemoteTransportException[[tlinf006][172.20.2.32:9300]    [internal:admin/repository/verify]]; 
	nested: RepositoryVerificationException[[snapfolder_elkludo] store location [/mnt/snapshot_elk/elk-ludo] 
	is not accessible on the node [{tlinf006}{bA2LzpSzT4eiHsYcctR1FA}{eI5E3XYHR-qK67CBIfz0ow}
	{172.20.2.32}{172.20.2.32:9300}{ml.machine_memory=3974455296, xpack.installed=true, ml.max_open_jobs=20, 
	ml.enabled=true}]]; nested: AccessDeniedException[/mnt/snapshot_elk/elk-ludo/tests-7p69a_5gTBq8toglCGjZeg/data-bA2LzpSzT4eiHsYcctR1FA.dat];'], 
	[lqfyvJyGQaSLhZ3-ex8rLA,

tlinf006 is on of the node of my cluster. I dont understand this message because, this server has the path mounted by nfs, I can browse it and I can write inside.

When I run this :

 sudo -u elasticsearch touch /mnt/snapshot_elk/elk-ludo/test

It's OK

the folder "/mnt/snapshot_elk/" has 777.

So what's the problem with my configuration ?

Thanks for your help

Problem solved !!

I have noticed elasticsearch user and group had a different id on each node of the cluster.
The group id and the user id has to be the same.

If you have different user and group id, you have to change like this

read and note the group id and user id of elasticsearch in /etc/passwd and /etc/group

stop elasticsearch service

change the id by 1412 for example)

usermod -u 1412 elasticsearch
groupmod -g 1412 elasticsearch

find the files with the old (986 and 990 for me) id and replace by elasticsearch

find / -group 986 -exec chgrp -h elasticsearch {} \;
find / -user 990 -exec chown -h elasticsearch {} \;


restart elasticsearch service

Do this on each node.

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