"IKAnalyzer.cfg.xml" "read" elasticSearch配置文件只读权限

elasticSearch加入ik分词器插件后,重新启动elasticSearch发现索引状态显示关闭,并且对索引库进行任何操作都会报异常
elasticSearch启动是报错如下

[2019-02-06T20:54:06,641][WARN ][o.e.g.Gateway ] [QmVtz2k] recovering
index [blog1/X5A1lttKSligimhq6FK2lw] failed - recovering as closed
java.security.AccessControlException: access denied (“java.io.FilePermission” “F
:\Program%20Files\ElasticSearch\elasticsearch-5.6.8\plugins\elasticsearch\config
\IKAnalyzer.cfg.xml” “read”)

at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:472) ~[?:?]
at java.security.AccessController.checkPermission(AccessController.java:
895) ~[?:?]
at java.lang.SecurityManager.checkPermission(SecurityManager.java:558) ~
[?:?]
at java.lang.SecurityManager.checkRead(SecurityManager.java:897) ~[?:?]
at java.io.FileInputStream.(FileInputStream.java:128) ~[?:?]
at org.wltea.analyzer.dic.Dictionary.(Dictionary.java:116) ~[?:?]
at org.wltea.analyzer.dic.Dictionary.initial(Dictionary.java:150) ~[?:?]
at org.wltea.analyzer.cfg.Configuration.(Configuration.java:40) ~[?:?]
at org.elasticsearch.index.analysis.IkTokenizerFactory.(IkTokenize
rFactory.java:15) ~[?:?]
at org.elasticsearch.index.analysis.IkTokenizerFactory.getIkSmartTokeniz
erFactory(IkTokenizerFactory.java:23) ~[?:?]
at org.elasticsearch.index.analysis.AnalysisRegistry.buildMapping(Analys
isRegistry.java:361) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.index.analysis.AnalysisRegistry.buildTokenizerFacto
ries(AnalysisRegistry.java:176) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.index.analysis.AnalysisRegistry.build(AnalysisRegis
try.java:154) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.index.IndexService.(IndexService.java:145) ~[
elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.index.IndexModule.newIndexService(IndexModule.java:
363) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.indices.IndicesService.createIndexService(IndicesSe
rvice.java:448) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.indices.IndicesService.verifyIndexMetadata(IndicesS
ervice.java:481) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.gateway.Gateway.performStateRecovery(Gateway.java:1
35) [elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.gateway.GatewayService 1. d o R u n ( G a t e w a y S e r v i c e . j a v a : 229 ) [ e l a s t i c s e a r c h − 5.6.8. j a r : 5.6.8 ] a t o r g . e l a s t i c s e a r c h . c o m m o n . u t i l . c o n c u r r e n t . T h r e a d C o n t e x t 1.doRun(GatewayService.java: 229) [elasticsearch-5.6.8.jar:5.6.8] at org.elasticsearch.common.util.concurrent.ThreadContext 1.doRun(GatewayService.java:229)[elasticsearch5.6.8.jar:5.6.8]atorg.elasticsearch.common.util.concurrent.ThreadContextContextPreserv
ingAbstractRunnable.doRun(ThreadContext.java:674) [elasticsearch-5.6.8.jar:5.6.8
]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(Abstrac
tRunnable.java:37) [elasticsearch-5.6.8.jar:5.6.8]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1167) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:641) [?:?]
at java.lang.Thread.run(Thread.java:844) [?:?]

分析为配置文件IKAnalyzer.cfg.xml只有可读权限

上网查了一下,将elasticSearch重新安装在根盘符下即可解决问题
因为 F:\Program Files文件夹下的都是默认的只读权限

=20200511编辑=
因为直接换成了根盘符下,就解决了问题,所以没注意到空格问题,评论的各位老哥都说的在理!

你可能感兴趣的:(开发,elasticsearch)