Rights elasticsearch


(Salma Ait Lhaj) #1

Please I have this erros :

 [2018-06-18T11:53:48,018][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: Unable to access 'path.data' (/data/elasticsearch)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.6.10.jar:5.6.10]
Caused by: java.lang.IllegalStateException: Unable to access 'path.data' (/data/elasticsearch)
        at org.elasticsearch.bootstrap.Security.addPath(Security.java:450) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:291) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:246) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.bootstrap.Security.configure(Security.java:119) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:228) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) ~[elasticsearch-5.6.10.jar:5.6.10]
        ... 6 more
Caused by: java.nio.file.AccessDeniedException: /data/elasticsearch
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) ~[?:1.8.0_171]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:1.8.0_171]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:1.8.0_171]
        at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384) ~[?:1.8.0_171]
        at java.nio.file.Files.createDirectory(Files.java:674) ~[?:1.8.0_171]
        at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781) ~[?:1.8.0_171]
        at java.nio.file.Files.createDirectories(Files.java:767) ~[?:1.8.0_171]
        at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:492) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.bootstrap.Security.addPath(Security.java:448) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:291) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:246) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.bootstrap.Security.configure(Security.java:119) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:228) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) ~[elasticsearch-5.6.10.jar:5.6.10]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) ~[elasticsearch-5.6.10.jar:5.6.10]

Help please


(David Pilato) #2

Check that your user can read/write /data/elasticsearch dir.


(Salma Ait Lhaj) #3
[root@frghcslnetv12 ~]# cd /data
[root@frghcslnetv12 data]# ls -l
total 24
drwxr-x---  3 elasticsearch elasticsearch  4096 Jun 18 13:36 elasticsearch

And :

drwxrwx---.   5 log-admin log-admin 4096 Jun 18 13:36 data

(system) #4

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