ES(elasticsearch)报错elasticsearch.keystore
[lin@localhost bin]$ ./elasticsearchException in thread "main" java.nio.file.AccessDeniedException: /lin/elasticsearch-8.0.0/config/elasticsearch.keystoreat java.base/sun.nio.fs.UnixException.translat
·
准备启动ES发现报错如下elasticsearch.keystore,一直没弄清楚怎么回事,即便我按照keystore关键字搜索也没有,后来我才意识到是权限的问题啊兄弟们!你们看其他文件都是lin:lin,只有这个elasticsearch.keystore归属于root,因为它是在我启动后才生成的,自然在我设置归属的时候没有包含在内,所以只要权限重新设置一下再启动就OK啦!
在正常启动之后,又会生成一个certs文件,在未设置的情况下,直接归属于lin:lin了。
[lin@localhost bin]$ ./elasticsearch
Exception in thread "main" java.nio.file.AccessDeniedException: /lin/elasticsearch-8.0.0/config/elasticsearch.keystore
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:182)
at java.base/java.nio.channels.FileChannel.open(FileChannel.java:298)
at java.base/java.nio.channels.FileChannel.open(FileChannel.java:357)
at org.apache.lucene.store.NIOFSDirectory.openInput(NIOFSDirectory.java:78)
at org.apache.lucene.store.Directory.openChecksumInput(Directory.java:152)
at org.elasticsearch.common.settings.KeyStoreWrapper.load(KeyStoreWrapper.java:244)
at org.elasticsearch.cli.keystore.HasPasswordKeyStoreCommand.execute(HasPasswordKeyStoreCommand.java:34)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:95)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
at org.elasticsearch.cli.Command.main(Command.java:77)
at org.elasticsearch.cli.keystore.KeyStoreCli.main(KeyStoreCli.java:33)
Skipping security auto configuration because the node keystore file [/lin/elasticsearch-8.0.0/config/elasticsearch.keystore] is not a readable regular file
Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: java.nio.file.AccessDeniedException: /lin/elasticsearch-8.0.0/config/elasticsearch.keystore
Likely root cause: java.nio.file.AccessDeniedException: /lin/elasticsearch-8.0.0/config/elasticsearch.keystore
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:182)
at java.base/java.nio.channels.FileChannel.open(FileChannel.java:298)
at java.base/java.nio.channels.FileChannel.open(FileChannel.java:357)
at org.apache.lucene.store.NIOFSDirectory.openInput(NIOFSDirectory.java:78)
at org.apache.lucene.store.Directory.openChecksumInput(Directory.java:152)
at org.elasticsearch.common.settings.KeyStoreWrapper.load(KeyStoreWrapper.java:244)
at org.elasticsearch.common.settings.KeyStoreWrapper.bootstrap(KeyStoreWrapper.java:209)
at org.elasticsearch.bootstrap.BootstrapUtil.loadSecureSettings(BootstrapUtil.java:60)
at org.elasticsearch.bootstrap.BootstrapUtil.loadSecureSettings(BootstrapUtil.java:55)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:301)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:166)
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:157)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
at org.elasticsearch.cli.Command.main(Command.java:77)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:122)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80)
[root@localhost elasticsearch-8.0.0]# cd config/ [root@localhost config]# ll -rw-rw---- 1 root root 439 2月 18 16:34 elasticsearch.keystore -rwxrwxrwx 1 lin lin 1042 2月 4 00:47 elasticsearch-plugins.example.yml -rwxrwxrwx 1 lin lin 3774 2月 18 16:34 elasticsearch.yml -rwxrwxrwx 1 lin lin 3008 2月 17 16:53 jvm.options drwxrwxrwx 2 lin lin 6 2月 4 00:52 jvm.options.d -rwxrwxrwx 1 lin lin 16480 2月 4 00:52 log4j2.properties -rwxrwxrwx 1 lin lin 473 2月 4 00:51 role_mapping.yml -rwxrwxrwx 1 lin lin 197 2月 4 00:51 roles.yml -rwxrwxrwx 1 lin lin 0 2月 4 00:51 users -rwxrwxrwx 1 lin lin 0 2月 4 00:51 users_roles [root@localhost config]#
[root@localhost elasticsearch-8.0.0]# cd config/
[root@localhost config]# ll
总用量 44
drwxr-x--- 2 lin lin 62 2月 18 16:34 certs
-rw-rw---- 1 lin lin 439 2月 18 16:34 elasticsearch.keystore
-rwxrwxrwx 1 lin lin 1042 2月 4 00:47 elasticsearch-plugins.example.yml
-rwxrwxrwx 1 lin lin 3774 2月 18 16:34 elasticsearch.yml
-rwxrwxrwx 1 lin lin 3008 2月 17 16:53 jvm.options
drwxrwxrwx 2 lin lin 6 2月 4 00:52 jvm.options.d
-rwxrwxrwx 1 lin lin 16480 2月 4 00:52 log4j2.properties
-rwxrwxrwx 1 lin lin 473 2月 4 00:51 role_mapping.yml
-rwxrwxrwx 1 lin lin 197 2月 4 00:51 roles.yml
-rwxrwxrwx 1 lin lin 0 2月 4 00:51 users
-rwxrwxrwx 1 lin lin 0 2月 4 00:51 users_roles
[root@localhost config]#
更多推荐
已为社区贡献6条内容
所有评论(0)