Elasticse报错-org.elasticsearch.bootstrap.BootstrapException: java.nio.file.AccessDeniedException

Issue

Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: java.nio.file.AccessDeniedException: /usr/local/elasticsearch/elasticsearch-7.1.0/config/elasticsearch.keystore
Likely root cause: java.nio.file.AccessDeniedException: /usr/local/elasticsearch/elasticsearch-7.1.0/config/elasticsearch.keystore
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
	at java.nio.file.Files.newByteChannel(Files.java:361)
	at java.nio.file.Files.newByteChannel(Files.java:407)
	at org.apache.lucene.store.SimpleFSDirectory.openInput(SimpleFSDirectory.java:77)
	at org.elasticsearch.common.settings.KeyStoreWrapper.load(KeyStoreWrapper.java:206)
	at org.elasticsearch.bootstrap.Bootstrap.loadSecureSettings(Bootstrap.java:224)
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:289)
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
	at org.elasticsearch.cli.Command.main(Command.java:90)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
Refer to the log for complete error details.

Elasticse报错-org.elasticsearch.bootstrap.BootstrapException: java.nio.file.AccessDeniedException_第1张图片

Answer

原因:elasticsearch.keystore文件没有权限

解决办法:切换到root用户修改文件elasticsearch.keystore权限

chmod -R destiny elasticsearch.keystore

你可能感兴趣的:(报错)