Error restarting service after change data path


(Carlosvega) #1

I made a clean install of elasticsearch and changed the data.path in the yml file like this:

path.data: /media/ssd/elasticsearch_data/

but I'm getting an error every time I restart the service:

Sep 16 11:46:03 hel systemd[1]: Starting Elasticsearch...
Sep 16 11:46:03 hel systemd[1]: Started Elasticsearch.
Sep 16 11:46:05 hel elasticsearch[30622]: {1.7.2}: Initialization Failed ...
Sep 16 11:46:05 hel elasticsearch[30622]: - ElasticsearchIllegalStateException[Failed to created node environment]
Sep 16 11:46:05 hel elasticsearch[30622]: AccessDeniedException[/media/ssd/elasticsearch_data/hpcn_es_cluster/nodes]
Sep 16 11:46:05 hel systemd[1]: elasticsearch.service: main process exited, code=exited, status=3/NOTIMPLEMENTED
Sep 16 11:46:05 hel systemd[1]: Unit elasticsearch.service entered failed state.

The log says:

[2015-09-16 11:46:05,355][INFO ][node ] [es_hele] version[1.7.2], pid[30622], build[e43676b/2015-09-14T09:49:53Z]
[2015-09-16 11:46:05,355][INFO ][node ] [es_hele] initializing ...
[2015-09-16 11:46:05,417][INFO ][plugins ] [es_hele] loaded [], sites []
[2015-09-16 11:46:05,438][ERROR][bootstrap ] Exception
org.elasticsearch.ElasticsearchIllegalStateException: Failed to created node environment
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:167)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:77)
at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:245)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
Caused by: java.nio.file.AccessDeniedException: /media/ssd/elasticsearch_data/hpcn_es_cluster/nodes
at sun.nio.fs.UnixException.translateToIOException(Unknown Source)
at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.UnixFileSystemProvider.checkAccess(Unknown Source)
at java.nio.file.Files.createDirectories(Unknown Source)
at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:132)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:165)
... 4 more

Is there any permission requirement for this folder?


(Mark Walkom) #2

Yeah, the elasticsearch user needs read and write.


(Carlosvega) #3

I fixed it by giving the right permissions to the mount point. My fault. :expressionless:
But is fixed now ! :smile:


(system) #4