java.lang.InternalError: internal error: SHA-1 not available


(David Doe) #1

Hi

Sorry if this question has been asked before, i searched but no where to be found

I'm unable to start elasticsearch
I did reinstall JAVA but nothing changed

Trying to use elasticsearch with wordpress
Following this https://github.com/10up/ElasticPress Tuto

I installed Elastic before java (just a mistake)
OS centos 7.1
ElasticSearch v5.4
Java 1.8.0.131

service elasticsearch status
elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2017-05-22 22:36:40 UTC; 2s ago
Docs: http://www.elastic.co
Process: 1657 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet -Edefault.path.logs=${LOG_DIR} -Edefault.path.data=${DATA_DIR} -Edefault.path.conf=${CONF_DIR} (code=exited, status=128)
Process: 1655 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
Main PID: 1657 (code=exited, status=128)

May 22 22:36:37 Movie systemd[1]: Starting Elasticsearch...
May 22 22:36:37 Movie systemd[1]: Started Elasticsearch.
May 22 22:36:40 Movie systemd[1]: elasticsearch.service: main process exited, code=exited, status=128/n/a
May 22 22:36:40 Movie systemd[1]: Unit elasticsearch.service entered failed state.
May 22 22:36:40 Movie systemd[1]: elasticsearch.service failed.


elasticsearch.yml

cluster.name: mycluster
node.name: mycluster1
network.host: localhost
http.port: 9200


Log

[ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [mycluster1] fatal error in thread [main], exiting
java.lang.InternalError: internal error: SHA-1 not available.
at sun.security.provider.SecureRandom.init(SecureRandom.java:108) ~[?:1.8.0_131]
at sun.security.provider.SecureRandom.(SecureRandom.java:79) ~[?:1.8.0_131]
at java.security.SecureRandom.getDefaultPRNG(SecureRandom.java:198) ~[?:1.8.0_131]
at java.security.SecureRandom.(SecureRandom.java:162) ~[?:1.8.0_131]
at java.io.File$TempDirectory.(File.java:1901) ~[?:1.8.0_131]
at java.io.File.createTempFile(File.java:2010) ~[?:1.8.0_131]
at com.sun.jna.Native.extractFromResourcePath(Native.java:1059) ~[jna-4.4.0.jar:4.4.0 (b0)]
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:937) ~[jna-4.4.0.jar:4.4.0 (b0)]
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:922) ~[jna-4.4.0.jar:4.4.0 (b0)]
at com.sun.jna.Native.(Native.java:190) ~[jna-4.4.0.jar:4.4.0 (b0)]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_131]
at java.lang.Class.forName(Class.java:264) ~[?:1.8.0_131]
at org.elasticsearch.bootstrap.Natives.(Natives.java:45) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:105) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:204) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:360) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.4.0.jar:5.4.0]
Caused by: java.security.NoSuchAlgorithmException: SHA MessageDigest not available
at sun.security.jca.GetInstance.getInstance(GetInstance.java:159) ~[?:1.8.0_131]
at java.security.Security.getImpl(Security.java:695) ~[?:1.8.0_131]
at java.security.MessageDigest.getInstance(MessageDigest.java:167) ~[?:1.8.0_131]
at sun.security.provider.SecureRandom.init(SecureRandom.java:106) ~[?:1.8.0_131]
... 22 more


(Jörg Prante) #2

You have misconfigured your Java.

Remove all Java packages and installations, including custom environment variables, and re-install the JDK you want again.


(David Doe) #3

Hi jprante

Thank You for your reply

I did forgot to mention that i'm using centmin mod, if that may play a role.

As for java all i did is yum install java, nothing more.


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.