legacy-knowledge-base
Publicado Jul. 25, 0002

"IOException: parseAlgParameters failed: ObjectIdentifier()" error on startup after securing connection to Elasticsearch with PKCS#12 certificate generated with a higher major version of JDK

written-by

Matheus Monteiro

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

Issue

  • Liferay DXP does not start up after securing the connection to Elasticsearch and, more specifically, after generating the Elasticsearch certificate .p12 using the keytool in a JDK with a higher major version than the one in which Liferay DXP is running. For example: Liferay DXP is using JDK8 and you are generating Elasticsearch certs using JDK 11.
  • The error shown is:
    The activate method has thrown an exception

    java.lang.RuntimeException: java.io.IOException: parseAlgParameters failed: ObjectIdentifier() -- data isn't an object ID (tag = 48)

    at com.liferay.portal.search.elasticsearch7.internal.connection.RestHighLevelClientFactory.createSSLContext(RestHighLevelClientFactory.java:172)

 

Environment

  • Liferay DXP using JDK version 8
  • PKCS#12 certificate (.p12) generated with a JDK version greater than 8.

 

Resolution

This is a JDK bug. You can do the following:

  • A.) Use the same version of JDK in both Liferay and Elasticsearch servers
  • B.) Use JKS format instead of PKCS12 for the Keystore

 

Additional Information

 

 

did-this-article-resolve-your-issue

legacy-knowledge-base