ObjectIdentifier() -- data isn‘t an object ID (tag = 48)
Posted 请叫我大师兄_
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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下载需要去官网,自己注册个账号,才能下载。
以上是关于ObjectIdentifier() -- data isn‘t an object ID (tag = 48)的主要内容,如果未能解决你的问题,请参考以下文章
ObjectIdentifier() -- data isn‘t an object ID (tag = 48)