Elasticsearch SHA-1不可用

时间:2016-03-15 17:00:50

标签: java exception elasticsearch

我在弹性搜索的开始时遇到以下错误:

Exception in thread "main" java.lang.InternalError: internal error: SHA-1 not available.
    at sun.security.provider.SecureRandom.init(SecureRandom.java:108)
    at sun.security.provider.SecureRandom.<init>(SecureRandom.java:79)
    at java.security.SecureRandom.getDefaultPRNG(SecureRandom.java:197)
    at java.security.SecureRandom.<init>(SecureRandom.java:161)
    at com.sun.crypto.provider.SunJCE.<clinit>(SunJCE.java:94)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at java.lang.Class.newInstance(Class.java:383)
    at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:221)
    at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:206)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:206)
    at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:187)
    at sun.security.jca.ProviderList.getProvider(ProviderList.java:232)
    at sun.security.jca.ProviderList$3.get(ProviderList.java:147)
    at sun.security.jca.ProviderList$3.get(ProviderList.java:142)
    at java.util.AbstractList$Itr.next(AbstractList.java:358)
    at java.security.SecureRandom.getPrngAlgorithm(SecureRandom.java:553)
    at java.security.SecureRandom.getDefaultPRNG(SecureRandom.java:193)
    at java.security.SecureRandom.<init>(SecureRandom.java:161)
    at org.elasticsearch.common.SecureRandomHolder.<clinit>(SecureRandomHolder.java:26)
    at org.elasticsearch.common.MacAddressProvider.constructDummyMulticastAddress(MacAddressProvider.java:89)
    at org.elasticsearch.common.MacAddressProvider.getSecureMungedAddress(MacAddressProvider.java:75)
    at org.elasticsearch.common.TimeBasedUUIDGenerator.<clinit>(TimeBasedUUIDGenerator.java:38)
    at org.elasticsearch.common.Strings.<clinit>(Strings.java:64)
    at org.elasticsearch.common.settings.Settings$Builder.replacePropertyPlaceholders(Settings.java:1176)
    at org.elasticsearch.node.internal.InternalSettingsPreparer.initializeSettings(InternalSettingsPreparer.java:131)
    at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:80)
    <<<truncated>>>

所以我尝试了简单,这不是一个例外:

import java.security.MessageDigest;

public class Test {
    public static void main(String[] args) throws Exception {
    MessageDigest md = MessageDigest.getInstance("SHA-1");
    }
}

这是一个可能与sha-1无关的错误吗?

0 个答案:

没有答案