Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

按照教程安装报错 #12

Open
YoungShy opened this issue Aug 29, 2018 · 5 comments
Open

按照教程安装报错 #12

YoungShy opened this issue Aug 29, 2018 · 5 comments

Comments

@YoungShy
Copy link

[2018-08-29T14:19:56,487][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [] fatal error in thread [elasticsearch[vFHEl-z][generic][T#3]], exiting
java.lang.ExceptionInInitializerError: null
at org.elasticsearch.index.analysis.AnalysisRegistry.buildMapping(AnalysisRegistry.java:363) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.index.analysis.AnalysisRegistry.buildTokenizerFactories(AnalysisRegistry.java:177) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.index.analysis.AnalysisRegistry.build(AnalysisRegistry.java:155) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.index.IndexService.(IndexService.java:162) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.index.IndexModule.newIndexService(IndexModule.java:367) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.indices.IndicesService.createIndexService(IndicesService.java:453) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.indices.IndicesService.verifyIndexMetadata(IndicesService.java:497) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.gateway.Gateway.performStateRecovery(Gateway.java:127) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.gateway.GatewayService$1.doRun(GatewayService.java:223) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:725) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-6.3.2.jar:6.3.2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_131]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "*" "read,write")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:1.8.0_131]
at java.security.AccessController.checkPermission(AccessController.java:884) ~[?:1.8.0_131]
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) ~[?:1.8.0_131]
at java.lang.SecurityManager.checkPropertiesAccess(SecurityManager.java:1262) ~[?:1.8.0_131]
at java.lang.System.getProperties(System.java:630) ~[?:1.8.0_131]
at org.elasticsearch.index.analysis.HanLPTokenizerFactory.(HanLPTokenizerFactory.java:22) ~[?:?]
... 14 more

@kepmov
Copy link
Owner

kepmov commented Sep 3, 2018

#4

@kepmov
Copy link
Owner

kepmov commented Sep 6, 2018

2、修改es config目录下的jvm.options文件,最后一行添加

-Djava.security.policy=../plugins/analysis-hanlp/plugin-security.policy

@DengGuangXue
Copy link

2、修改es config目录下的jvm.options文件,最后一行添加

-Djava.security.policy=../plugins/analysis-hanlp/plugin-security.policy

我按上面步骤做了,还是报错,如下所示:
[2019-04-20T12:03:03,834][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [k1WDWmL] fatal error in thread [elasticsearch[k1WDWmL][analyze][T#1]], exiting
java.lang.ExceptionInInitializerError: null
at com.hankcs.hanlp.seg.Segment.seg(Segment.java:338) ~[?:?]
at com.hankcs.lucene4.HanlpSegmenter.next(HanlpSegmenter.java:65) ~[?:?]
at com.hankcs.lucene4.HanLPTokenizer.incrementToken(HanLPTokenizer.java:46) ~[?:?]
at org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction.simpleAnalyze(TransportAnalyzeAction.java:275) ~[elasticsearch-6.6.2.jar:6.6.2]
at org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction.analyze(TransportAnalyzeAction.java:252) ~[elasticsearch-6.6.2.jar:6.6.2]
at org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction.shardOperation(TransportAnalyzeAction.java:170) ~[elasticsearch-6.6.2.jar:6.6.2]
at org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction.shardOperation(TransportAnalyzeAction.java:81) ~[elasticsearch-6.6.2.jar:6.6.2]
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$1.doRun(TransportSingleShardAction.java:115) ~[elasticsearch-6.6.2.jar:6.6.2]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:759) ~[elasticsearch-6.6.2.jar:6.6.2]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-6.6.2.jar:6.6.2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_65]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_65]
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "*" "read,write")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:1.8.0_65]
at java.security.AccessController.checkPermission(AccessController.java:884) ~[?:1.8.0_65]
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) ~[?:1.8.0_65]
at java.lang.SecurityManager.checkPropertiesAccess(SecurityManager.java:1262) ~[?:1.8.0_65]
at java.lang.System.getProperties(System.java:630) ~[?:1.8.0_65]
at com.hankcs.hanlp.HanLP$Config.(HanLP.java:240) ~[?:?]
... 13 more
求指教,谢谢!

@DengGuangXue
Copy link

image

@DengGuangXue
Copy link

2、修改es config目录下的jvm.options文件,最后一行添加

-Djava.security.policy=../plugins/analysis-hanlp/plugin-security.policy

我去掉 ../ 后,发现就可以了
-Djava.security.policy=plugins/analysis-hanlp/plugin-security.policy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants