KennFalcon / elasticsearch-analysis-hanlp

HanLP Analyzer for Elasticsearch
Apache License 2.0
830 stars 224 forks source link

elasticsearch 7.5.1 apt 安装,安装elasticsearch-analysis-hanlp 7.5.1 之后,启动失败 #107

Open neulf opened 3 years ago

neulf commented 3 years ago

● elasticsearch.service - Elasticsearch Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2021-02-07 16:02:11 CST; 5s ago Docs: http://www.elastic.co Process: 1484 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=e Main PID: 1484 (code=exited, status=1/FAILURE) Tasks: 0 (limit: 4915) CGroup: /system.slice/elasticsearch.service

设置了HANLP_ROOT也不管用

neulf commented 3 years ago

[2021-02-07T16:02:11,350][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [nas-huaxin] fatal error in thread [main], exiting java.lang.ExceptionInInitializerError: null at org.elasticsearch.plugin.analysis.hanlp.AnalysisHanLPPlugin.lambda$getTokenizers$0(AnalysisHanLPPlugin.java:67) ~[?:?] at java.security.AccessController.doPrivileged(AccessController.java:312) ~[?:?] at org.elasticsearch.plugin.analysis.hanlp.AnalysisHanLPPlugin.getTokenizers(AnalysisHanLPPlugin.java:67) ~[?:?] at org.elasticsearch.common.NamedRegistry.extractAndRegister(NamedRegistry.java:54) ~[elasticsearch-7.5.1.jar:7.5.1] at org.elasticsearch.indices.analysis.AnalysisModule.setupTokenizers(AnalysisModule.java:235) ~[elasticsearch-7.5.1.jar:7.5.1] at org.elasticsearch.indices.analysis.AnalysisModule.(AnalysisModule.java:84) ~[elasticsearch-7.5.1.jar:7.5.1] at org.elasticsearch.node.Node.(Node.java:342) ~[elasticsearch-7.5.1.jar:7.5.1] at org.elasticsearch.node.Node.(Node.java:253) ~[elasticsearch-7.5.1.jar:7.5.1] at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:221) ~[elasticsearch-7.5.1.jar:7.5.1] at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221) ~[elasticsearch-7.5.1.jar:7.5.1] at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349) ~[elasticsearch-7.5.1.jar:7.5.1] at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.5.1.jar:7.5.1] at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.5.1.jar:7.5.1] at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.5.1.jar:7.5.1] at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125) ~[elasticsearch-cli-7.5.1.jar:7.5.1] at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.5.1.jar:7.5.1] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.5.1.jar:7.5.1] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.5.1.jar:7.5.1] Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "data/dictionary/CoreNatureDictionary.tr.txt" "read") at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:?] at java.security.AccessController.checkPermission(AccessController.java:1036) ~[?:?] at java.lang.SecurityManager.checkPermission(SecurityManager.java:408) ~[?:?] at java.lang.SecurityManager.checkRead(SecurityManager.java:747) ~[?:?] at java.io.File.isFile(File.java:878) ~[?:?] at com.hankcs.hanlp.HanLP$Config.(HanLP.java:335) ~[?:?] ... 18 more

Laky-w commented 3 years ago

请问最后如何解决的啊

neulf commented 3 years ago

请问最后如何解决的啊

好像重新安装,保证es和插件的版本完全一致可以

akarosefore commented 2 years ago

一样的错误