- Published Date:Jun. 7, 2016
Article Summary
On Elasticsearch, When I executed bin/plugin command, SSLException java.security.ProviderException occurred.
This article describes how to modify this error.
日本語で読む
Environment
- vagrant centos6.5
- elasticsearch2.1.1
- java(OpenJDK) version 1.7.0_91
Failure of kuromoji plugin installation.
kurimoji is the Japanese Analysis plugin. elasticsearch 2.1 integrates this plugin as official.
So, this plugin can be installed using the plugin manager.
sudo /usr/share/elasticsearch/bin/plugin install --verbose analysis-kuromoji Failed: SSLException[java.security.ProviderException: java.security.KeyException]; nested: ProviderException[java.security.KeyException]; nested: KeyException; ERROR: failed to download out of all possible locations
But, in my environment, plugin installation failed.
Switch Java Version
The cause of the failure is java version.
so, I checked java version.
// centos yum search java | grep openjdk java-1.6.0-openjdk.x86_64 : OpenJDK Runtime Environment java-1.6.0-openjdk-demo.x86_64 : OpenJDK Demos java-1.6.0-openjdk-devel.x86_64 : OpenJDK Development Environment java-1.6.0-openjdk-javadoc.x86_64 : OpenJDK API Documentation java-1.6.0-openjdk-src.x86_64 : OpenJDK Source Bundle java-1.7.0-openjdk.x86_64 : OpenJDK Runtime Environment java-1.7.0-openjdk-demo.x86_64 : OpenJDK Demos java-1.7.0-openjdk-devel.x86_64 : OpenJDK Development Environment java-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentation java-1.7.0-openjdk-src.x86_64 : OpenJDK Source Bundle java-1.8.0-openjdk.x86_64 : OpenJDK Runtime Environment java-1.8.0-openjdk-debug.x86_64 : OpenJDK Runtime Environment with full debug on java-1.8.0-openjdk-demo.x86_64 : OpenJDK Demos java-1.8.0-openjdk-demo-debug.x86_64 : OpenJDK Demos with full debug on java-1.8.0-openjdk-devel.x86_64 : OpenJDK Development Environment java-1.8.0-openjdk-devel-debug.x86_64 : OpenJDK Development Environment with java-1.8.0-openjdk-headless.x86_64 : OpenJDK Runtime Environment java-1.8.0-openjdk-headless-debug.x86_64 : OpenJDK Runtime Environment with full java-1.8.0-openjdk-javadoc.noarch : OpenJDK API Documentation java-1.8.0-openjdk-javadoc-debug.noarch : OpenJDK API Documentation for packages java-1.8.0-openjdk-src.x86_64 : OpenJDK Source Bundle java-1.8.0-openjdk-src-debug.x86_64 : OpenJDK Source Bundle for packages with
There is java-1.8.0-openjdk.
Next, check using java version.
alternatives --config java There are 2 programs which provide 'java'. Selection Command ----------------------------------------------- 1 /usr/lib/jvm/jre-1.5.0-gcj/bin/java *+ 2 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
java-1.8.0-openjdk is not installed.
I will install it.
sudo yum install -y java-1.8.0-openjdk
check using java version.
java -version java version "1.7.0_91"
Java version is still not changed. I will switch java version.
sudo alternatives --config java There are 3 programs which provide 'java'. Selection Command ----------------------------------------------- 1 /usr/lib/jvm/jre-1.5.0-gcj/bin/java *+ 2 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java 3 /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java Enter to keep the current selection[+], or type selection number: 3
I check using java version again.
java -version openjdk version "1.8.0_65" OpenJDK Runtime Environment (build 1.8.0_65-b17) OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)
Version was changed to java-1.8.0-openjdk.
Reinstallation of kurimoji plugijn
On java-1.8.0-openjdk, bin/plugin command executes again.
sudo /usr/share/elasticsearch/bin/plugin install --verbose analysis-kuromoji Downloading .DONE - Plugin information: Name: analysis-kuromoji Description: The Japanese (kuromoji) Analysis plugin integrates Lucene kuromoji analysis module into elasticsearch. Site: false Version: 2.1.1 JVM: true * Classname: org.elasticsearch.plugin.analysis.kuromoji.AnalysisKuromojiPlugin * Isolated: true Installed analysis-kuromoji into /usr/share/elasticsearch/plugins/analysis-kuromoji
It worked out.
just in case, I will check installed plugin.
sudo /usr/share/elasticsearch/bin/plugin list Installed plugins in /usr/share/elasticsearch/plugins: - analysis-kuromoji
I want to continie to using java7.
sudo alternatives --config java There are 3 programs which provide 'java'. Selection Command ----------------------------------------------- 1 /usr/lib/jvm/jre-1.5.0-gcj/bin/java * 2 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java + 3 /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java Enter to keep the current selection[+], or type selection number: 2 java -version java version "1.7.0_91" OpenJDK Runtime Environment (rhel-2.6.2.2.el6_7-x86_64 u91-b00) OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode) sudo /usr/share/elasticsearch/bin/plugin list Installed plugins in /usr/share/elasticsearch/plugins: - analysis-kuromoji
It worked out.
Conclusion
On elasticsearch2.1.1, if you want to execute plugin command, you must update to java version 8.
Once installed, you can use by java version 7.
But I recommend that you makes your app environment latest. update work is very important.
See you
Reference Site
- How To Install JAVA ( OpenJDK ) 6 / 7 / 8 in Linux
- Troubleshooting story - Java HTTP client crashes on connections
0 件のコメント:
コメントを投稿