Cannot register snapshot repository in Elasticsearch

Hello ES community,

I am trying to create a snapshot for ES and I am following the steps at:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-snapshots.html
.

Unfortunately the repository creation fails in our environment: Debian 6.0.9

This is what I run:

curl -XPUT 'http://localhost:9200/_snapshot/my_backup' -d '{
"type": "fs",
"settings": {
"location": "/mount/backups/my_backup",
"compress": true
}
}'

The Error I get every time: (for info, just in case i restarted ES...)

{"error":"RepositoryException[[my_backup] failed to create repository];
nested: CreationException[Guice creation errors:\n\n1) Error injecting
constructor, org.elasticsearch.common.blobstore.BlobStoreException: Failed
to create directory at [/mount/backups/my_backup]\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:
BlobStoreException[Failed to create directory at
[/mount/backups/my_backup]]; ","status":500}

Here is our version of ES:

{
"status" : 200,
"name" : "Slither",
"version" : {
"number" : "1.0.1",
"build_hash" : "5c03844e1978e5cc924dab2a423dc63ce881c42b",
"build_timestamp" : "2014-02-25T15:52:53Z",
"build_snapshot" : false,
"lucene_version" : "4.6"
},

I spent quite a long time trying to find something on the web in all the ES
threads but without any luck....Am I missing something obvious???

Many thanks in advance for your help.

Kind regards

Fred

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/25e30d61-6148-452a-975c-0a04d992ebb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Did you check your read/write settings for /mount/backups dir?
They should be writable by the user which runs elasticsearch.

If still not working, could you try create /mount/backups/my_backup and gives privileges to elasticsearch user?

HTH

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 16 mai 2014 à 17:55:28, Fred Ducrot (ducrot.frederic@gmail.com) a écrit:

Hello ES community,

I am trying to create a snapshot for ES and I am following the steps at: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-snapshots.html.

Unfortunately the repository creation fails in our environment: Debian 6.0.9

This is what I run:

curl -XPUT 'http://localhost:9200/_snapshot/my_backup' -d '{
"type": "fs",
"settings": {
"location": "/mount/backups/my_backup",
"compress": true
}
}'

The Error I get every time: (for info, just in case i restarted ES...)

{"error":"RepositoryException[[my_backup] failed to create repository]; nested: CreationException[Guice creation errors:\n\n1) Error injecting constructor, org.elasticsearch.common.blobstore.BlobStoreException: Failed to create directory at [/mount/backups/my_backup]\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: BlobStoreException[Failed to create directory at [/mount/backups/my_backup]]; ","status":500}

Here is our version of ES:

{
"status" : 200,
"name" : "Slither",
"version" : {
"number" : "1.0.1",
"build_hash" : "5c03844e1978e5cc924dab2a423dc63ce881c42b",
"build_timestamp" : "2014-02-25T15:52:53Z",
"build_snapshot" : false,
"lucene_version" : "4.6"
},

I spent quite a long time trying to find something on the web in all the ES threads but without any luck....Am I missing something obvious???

Many thanks in advance for your help.

Kind regards

Fred

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/25e30d61-6148-452a-975c-0a04d992ebb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.5376357b.7644a45c.f868%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.

Hi David,

Thanks for your prompt reply. It was a rights issue as you suspected. So it
was VERY obvious!

Mental note: Don't try to do things on a Friday afternoon after an awfully
tiring week! :wink:

Thanks again for your help.

Fred

On Friday, 16 May 2014 17:57:46 UTC+2, David Pilato wrote:

Did you check your read/write settings for /mount/backups dir?
They should be writable by the user which runs elasticsearch.

If still not working, could you try create /mount/backups/my_backup and
gives privileges to elasticsearch user?

HTH

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 16 mai 2014 à 17:55:28, Fred Ducrot (ducrot....@gmail.com <javascript:>)
a écrit:

Hello ES community,

I am trying to create a snapshot for ES and I am following the steps at:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-snapshots.html
.

Unfortunately the repository creation fails in our environment: Debian
6.0.9

This is what I run:

curl -XPUT 'http://localhost:9200/_snapshot/my_backup' -d '{
"type": "fs",
"settings": {
"location": "/mount/backups/my_backup",
"compress": true
}
}'

The Error I get every time: (for info, just in case i restarted ES...)

{"error":"RepositoryException[[my_backup] failed to create repository];
nested: CreationException[Guice creation errors:\n\n1) Error injecting
constructor, org.elasticsearch.common.blobstore.BlobStoreException: Failed
to create directory at [/mount/backups/my_backup]\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:
BlobStoreException[Failed to create directory at
[/mount/backups/my_backup]]; ","status":500}

Here is our version of ES:

{
"status" : 200,
"name" : "Slither",
"version" : {
"number" : "1.0.1",
"build_hash" : "5c03844e1978e5cc924dab2a423dc63ce881c42b",
"build_timestamp" : "2014-02-25T15:52:53Z",
"build_snapshot" : false,
"lucene_version" : "4.6"
},

I spent quite a long time trying to find something on the web in all the
ES threads but without any luck....Am I missing something obvious???

Many thanks in advance for your help.

Kind regards

Fred

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/25e30d61-6148-452a-975c-0a04d992ebb4%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/25e30d61-6148-452a-975c-0a04d992ebb4%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d4a73011-fd6e-437d-84e0-387cd771bc43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi David,

Thanks for the solution. But checking the same command with 'sudo' also
didn't worked out. So please tell how to reset the read/write settings

Thanks,
Dinesh Kumar P

On Friday, 16 May 2014 21:27:46 UTC+5:30, David Pilato wrote:

Did you check your read/write settings for /mount/backups dir?
They should be writable by the user which runs elasticsearch.

If still not working, could you try create /mount/backups/my_backup and
gives privileges to elasticsearch user?

HTH

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfr
https://twitter.com/elasticsearchfr

Le 16 mai 2014 à 17:55:28, Fred Ducrot (ducrot....@gmail.com <javascript:>)
a écrit:

Hello ES community,

I am trying to create a snapshot for ES and I am following the steps at:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-snapshots.html
.

Unfortunately the repository creation fails in our environment: Debian
6.0.9

This is what I run:

curl -XPUT 'http://localhost:9200/_snapshot/my_backup' -d '{
"type": "fs",
"settings": {
"location": "/mount/backups/my_backup",
"compress": true
}
}'

The Error I get every time: (for info, just in case i restarted ES...)

{"error":"RepositoryException[[my_backup] failed to create repository];
nested: CreationException[Guice creation errors:\n\n1) Error injecting
constructor, org.elasticsearch.common.blobstore.BlobStoreException: Failed
to create directory at [/mount/backups/my_backup]\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:
BlobStoreException[Failed to create directory at
[/mount/backups/my_backup]]; ","status":500}

Here is our version of ES:

{
"status" : 200,
"name" : "Slither",
"version" : {
"number" : "1.0.1",
"build_hash" : "5c03844e1978e5cc924dab2a423dc63ce881c42b",
"build_timestamp" : "2014-02-25T15:52:53Z",
"build_snapshot" : false,
"lucene_version" : "4.6"
},

I spent quite a long time trying to find something on the web in all the
ES threads but without any luck....Am I missing something obvious???

Many thanks in advance for your help.

Kind regards

Fred

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/25e30d61-6148-452a-975c-0a04d992ebb4%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/25e30d61-6148-452a-975c-0a04d992ebb4%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/629eb3ca-c283-4a26-b385-b6cd6ebdf4b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Not sure I can help. It seems to me a privilege issue, something you should fix on your system.
Try to chmod this dir and check your mount settings.

Before elasticsearch can use this dir, you should be able to write a file in it using the same login used to run elasticsearch service.

You could paste here what gives ls -l yourdir and also the result of the mount command.

Note that if you have more than one node, all nodes need to have the same access to the same path.

David

Le 25 nov. 2014 à 07:25, dinesh kumar dinesarun@gmail.com a écrit :

Hi David,

Thanks for the solution. But checking the same command with 'sudo' also didn't worked out. So please tell how to reset the read/write settings

Thanks,
Dinesh Kumar P

On Friday, 16 May 2014 21:27:46 UTC+5:30, David Pilato wrote:
Did you check your read/write settings for /mount/backups dir?
They should be writable by the user which runs elasticsearch.

If still not working, could you try create /mount/backups/my_backup and gives privileges to elasticsearch user?

HTH

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 16 mai 2014 à 17:55:28, Fred Ducrot (ducrot....@gmail.com) a écrit:

Hello ES community,

I am trying to create a snapshot for ES and I am following the steps at: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-snapshots.html.

Unfortunately the repository creation fails in our environment: Debian 6.0.9

This is what I run:

curl -XPUT 'http://localhost:9200/_snapshot/my_backup' -d '{
"type": "fs",
"settings": {
"location": "/mount/backups/my_backup",
"compress": true
}
}'

The Error I get every time: (for info, just in case i restarted ES...)

{"error":"RepositoryException[[my_backup] failed to create repository]; nested: CreationException[Guice creation errors:\n\n1) Error injecting constructor, org.elasticsearch.common.blobstore.BlobStoreException: Failed to create directory at [/mount/backups/my_backup]\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: BlobStoreException[Failed to create directory at [/mount/backups/my_backup]]; ","status":500}

Here is our version of ES:

{
"status" : 200,
"name" : "Slither",
"version" : {
"number" : "1.0.1",
"build_hash" : "5c03844e1978e5cc924dab2a423dc63ce881c42b",
"build_timestamp" : "2014-02-25T15:52:53Z",
"build_snapshot" : false,
"lucene_version" : "4.6"
},

I spent quite a long time trying to find something on the web in all the ES threads but without any luck....Am I missing something obvious???

Many thanks in advance for your help.

Kind regards

Fred

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/25e30d61-6148-452a-975c-0a04d992ebb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/629eb3ca-c283-4a26-b385-b6cd6ebdf4b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/52273B5E-BC29-4AB9-A470-6B1AD201125C%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.