準(zhǔn)備啟動(dòng)ES發(fā)現(xiàn)報(bào)錯(cuò)如下elasticsearch.keystore,一直沒(méi)弄清楚怎么回事,即便我按照keystore關(guān)鍵字搜索也沒(méi)有,后來(lái)我才意識(shí)到是權(quán)限的問(wèn)題啊兄弟們!你們看其他文件都是lin:lin,只有這個(gè)elasticsearch.keystore歸屬于root,因?yàn)樗窃谖覇?dòng)后才生成的,自然在我設(shè)置歸屬的時(shí)候沒(méi)有包含在內(nèi),所以只要權(quán)限重新設(shè)置一下再啟動(dòng)就OK啦!文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-528218.html
在正常啟動(dòng)之后,又會(huì)生成一個(gè)certs文件,在未設(shè)置的情況下,直接歸屬于lin:lin了。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-528218.html
[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]#
到了這里,關(guān)于ES(elasticsearch)報(bào)錯(cuò)elasticsearch.keystore的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!