想给es 安装一个ik 的插件, 我的es 是 2.4.0, 下载了一个版本是 1.9.5,
[2016-10-09 16:56:26,248][INFO ][node ] [node-2] initializing ...
[2016-10-09 16:56:27,309][ERROR][bootstrap ] Exception
java.lang.IllegalArgumentException: Plugin [analysis-ik] is incompatible with Elasticsearch [2.4.0]. Was designed for version [2.3.5]
at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:118)
at org.elasticsearch.plugins.PluginsService.getPluginBundles(PluginsService.java:378)
at org.elasticsearch.plugins.PluginsService.(PluginsService.java:128)
at org.elasticsearch.node.Node.(Node.java:158)
at org.elasticsearch.node.Node.(Node.java:140)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:143)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:194)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
版本不匹配, 我晕!
原来是这样的:
Versions
IK version ES version
master 5.x -> master
5.0.0-beta1 5.0.0-beta1
1.9.5 2.3.5
1.9.4 2.3.4
1.9.3 2.3.3
1.9.0 2.3.0
1.8.1 2.2.1
1.7.0 2.1.1
1.5.0 2.0.0
1.2.6 1.0.0
1.2.5 0.90.x
1.1.3 0.20.x
1.0.0 0.16.2 -> 0.19.0
可是, 其中没有一个ik 的版本是和我的2.4.0 的ES 匹配的啊!
修改ik 的插件描述文件:
vi plugin-descriptor.properties
将 改成了 2.4.0
elasticsearch.version=2.3.5
->
elasticsearch.version=2.4.0
伴随着一个侥幸的心理, 试试吧, 不至于一个版本差别这么小就导致了不兼容了吧!
重启ES, 还是不行! 出现了 jar hell ! OMG !
[2016-10-09 17:00:20,652][WARN ][bootstrap ] unable to install syscall filter: seccomp unavailable: requires kernel 3.5+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER compiled in
[2016-10-09 17:00:21,325][INFO ][node ] [node-2] version[2.4.0], pid[14064], build[ce9f0c7/2016-08-29T09:14:17Z][2016-10-09 17:00:21,325][INFO ][node ] [node-2] initializing ...
[2016-10-09 17:00:22,532][ERROR][bootstrap ] Exception
java.lang.IllegalStateException: failed to load bundle [file:/usr/share/elasticsearch/plugins/ik/httpcore-4.4.4.jar, file:/usr/share/elasticsearch/plugins/ik/commons-codec-1.9.jar, file:/usr/share/elasticsearch/plugins/ik/httpclient-4.5.2.jar, file:/usr/share/elasticsearch/plugins/ik/elasticsearch-analysis-ik-1.9.5.jar, file:/usr/share/elasticsearch/plugins/ik/commons-logging-1.2.jar] due to jar hell
at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:421)
at org.elasticsearch.plugins.PluginsService.(PluginsService.java:129)
at org.elasticsearch.node.Node.(Node.java:158)
at org.elasticsearch.node.Node.(Node.java:140)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:143)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:194)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Caused by: java.lang.IllegalStateException: jar hell!
class: org.elasticsearch.indices.analysis.IKIndicesAnalysis$2
jar1: /usr/share/elasticsearch/lib/elasticsearch-analysis-ik-1.9.5.jar
jar2: /usr/share/elasticsearch/plugins/ik/elasticsearch-analysis-ik-1.9.5.jar
at org.elasticsearch.bootstrap.JarHell.checkClass(JarHell.java:280)
at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:186)
at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:419)
... 7 more
jar hell 表明是同名jar , 不同版本的冲突, (也有可能是相同版本)
仔细一看, 原来有两个 elasticsearch-analysis-ik-1.9.5.jar, 第一个是我手动拷贝到 kibana/lib 下去的, 第二个是 kibana plugins下的, 哦!
删除kibana/lib 中的那个 就可以了!