I read file Elasticsearch.log and found the notice
org.elasticsearch.ElasticsearchException: failed to bind service
at org.elasticsearch.node.Node.<init>(Node.java:744) ~[elasticsearch-7.12.1.jar:7.12.1]
at org.elasticsearch.node.Node.<init>(Node.java:278) ~[elasticsearch-7.12.1.jar:7.12.1]
at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:217)
This is the log content. It says Unable to access 'path.data', but i don't know how to fix
[2021-11-17T23:40:12,226][ERROR][o.e.b.Bootstrap ] [dell-Precision-M4800] Exception
java.lang.IllegalStateException: Unable to access 'path.data' (/var/lib/elasticsearch)
at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:61) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:208) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:155) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Security.configure(Security.java:105) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:214) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:399) [elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:167) [elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:158) [elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75) [elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:114) [elasticsearch-cli-7.15.2.jar:7.15.2]
at org.elasticsearch.cli.Command.main(Command.java:79) [elasticsearch-cli-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:123) [elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81) [elasticsearch-7.15.2.jar:7.15.2]
Caused by: java.nio.file.AccessDeniedException: /var/lib/elasticsearch
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
at sun.nio.fs.UnixFileSystemProvider.checkAccess(UnixFileSystemProvider.java:314) ~[?:?]
at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:296) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:59) ~[elasticsearch-7.15.2.jar:7.15.2]
... 12 more
[2021-11-17T23:40:12,238][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [dell-Precision-M4800] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: Unable to access 'path.data' (/var/lib/elasticsearch)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:171) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:158) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:114) ~[elasticsearch-cli-7.15.2.jar:7.15.2]
at org.elasticsearch.cli.Command.main(Command.java:79) ~[elasticsearch-cli-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:123) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81) ~[elasticsearch-7.15.2.jar:7.15.2]
Caused by: java.lang.IllegalStateException: Unable to access 'path.data' (/var/lib/elasticsearch)
at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:61) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:208) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:155) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Security.configure(Security.java:105) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:214) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:399) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:167) ~[elasticsearch-7.15.2.jar:7.15.2]
... 6 more
Caused by: java.nio.file.AccessDeniedException: /var/lib/elasticsearch
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
at sun.nio.fs.UnixFileSystemProvider.checkAccess(UnixFileSystemProvider.java:314) ~[?:?]
at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:296) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:59) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:208) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:155) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Security.configure(Security.java:105) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:214) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:399) ~[elasticsearch-7.15.2.jar:7.15.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:167) ~[elasticsearch-7.15.2.jar:7.15.2]
... 6 more
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.