0


ObjectIdentifier() -- data isn‘t an object ID (tag = 48)

记录一个离奇的bug:需求是es版本由7.8升级到7.14.2,然后,升级完es客户端之后,客户端连不上es,es客户端开启了xpack用户认证。然后就出这个异常。

Caused by: ElasticsearchException[failed to initialize SSL TrustManager]; nested: IOException[parseAlgParameters failed: ObjectIdentifier() -- data isn't an object ID (tag = 48)]; nested: IOException[ObjectIdentifier() -- data isn't an object ID (tag = 48)];
    at org.elasticsearch.xpack.core.ssl.StoreTrustConfig.createTrustManager(StoreTrustConfig.java:75)
    at org.elasticsearch.xpack.core.ssl.SSLService.createSslContext(SSLService.java:439)
    at java.util.HashMap.computeIfAbsent(HashMap.java:1127)
    at org.elasticsearch.xpack.core.ssl.SSLService.lambda$loadSSLConfigurations$5(SSLService.java:528)
    ... 82 more
Caused by: java.io.IOException: parseAlgParameters failed: ObjectIdentifier() -- data isn't an object ID (tag = 48)
    at sun.security.pkcs12.PKCS12KeyStore.parseAlgParameters(PKCS12KeyStore.java:816)
    at sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2018)
    at java.security.KeyStore.load(KeyStore.java:1445)
    at org.elasticsearch.xpack.core.ssl.TrustConfig.getStore(TrustConfig.java:98)
    at org.elasticsearch.xpack.core.ssl.StoreTrustConfig.createTrustManager(StoreTrustConfig.java:66)
    ... 85 more
Caused by: java.io.IOException: ObjectIdentifier() -- data isn't an object ID (tag = 48)
    at sun.security.util.ObjectIdentifier.<init>(ObjectIdentifier.java:257)
    at sun.security.util.DerInputStream.getOID(DerInputStream.java:314)
    at com.sun.crypto.provider.PBES2Parameters.engineInit(PBES2Parameters.java:267)
    at java.security.AlgorithmParameters.init(AlgorithmParameters.java:293)
    at sun.security.pkcs12.PKCS12KeyStore.parseAlgParameters(PKCS12KeyStore.java:812)
    ... 89 more

起初以为是生成的认证文件有问题,但是呢,在浏览器上使用es head能正常访问es7.14.2。

最终,是改一下jdk的版本就好了。

原来使用的jdk的版本是:1.8.0.171

升级到:1.8.0.333

这个版本的jdk下载需要去官网,自己注册个账号,才能下载。


本文转载自: https://blog.csdn.net/qq_27093465/article/details/125258784
版权归原作者 请叫我大师兄_ 所有, 如有侵权,请联系我们删除。

“ObjectIdentifier() -- data isn‘t an object ID (tag = 48)”的评论:

还没有评论