Getting a certificate error in logs


Sometimes, the installation logs may display the following certificate errors:

Incorrect file location error

The installation logs show the following error when the certificate.keystore file is not present in the jms-ssl-configuration.xml file at the defined location <peer>/config/:

06 Jul 2022 01:59:36,751 [Thread=AMP - ESB Network Initializer - 1] ERROR ESBNetwork      : An error occurred while loading the certificate.
com.realops.foundation.gridframework.PersistCertificateFailedException: An error occurred while loading the certificate.
   at com.realops.foundation.gridframework.CertificateKeystoreDetails.createKeyStore(CertificateKeystoreDetails.java:91)
   at com.realops.foundation.gridframework.CertificatePersistorImpl.loadCertificate(CertificatePersistorImpl.java:99)
   at com.bmc.ao.foundation.esb.ESBNetwork.connect(ESBNetwork.java:85)
   at com.bmc.repository.server.esb.ESBNetworkInitializationTask.run(ESBNetworkInitializationTask.java:109)
   at com.bmc.repository.server.esb.ESBNetworkInitializer$1.doInitializeLoop(ESBNetworkInitializer.java:89)
   at com.bmc.repository.server.esb.ESBNetworkInitializer$1.run(ESBNetworkInitializer.java:65)
   at java.lang.Thread.run(Thread.java:750)
Caused by: com.realops.foundation.gridframework.PersistCertificateFailedException: SSL/CA certifcate not available on given path.
   at com.realops.foundation.gridframework.CertificateKeystoreDetails.isKeyFileISPresent(CertificateKeystoreDetails.java:179)
   at com.realops.foundation.gridframework.CertificateKeystoreDetails.createKeyStore(CertificateKeystoreDetails.java:60)
    ... 6 more
06 Jul 2022 01:59:36,755 [Thread=AMP - ESB Network Initializer - 1] ERROR ESBNetworkInitializationTask : Failed to start ESB Network.
com.bmc.ao.foundation.esb.ESBConnectFailedException: Message[summary=Failed to connect to ESB broker network: {0}, detail=An error occurred while loading the certificate.]
   at com.bmc.ao.foundation.esb.ESBNetwork.connect(ESBNetwork.java:91)
   at com.bmc.repository.server.esb.ESBNetworkInitializationTask.run(ESBNetworkInitializationTask.java:109)
   at com.bmc.repository.server.esb.ESBNetworkInitializer$1.doInitializeLoop(ESBNetworkInitializer.java:89)
   at com.bmc.repository.server.esb.ESBNetworkInitializer$1.run(ESBNetworkInitializer.java:65)
   at java.lang.Thread.run(Thread.java:750)
Caused by: com.realops.foundation.gridframework.PersistCertificateFailedException: An error occurred while loading the certificate.
   at com.realops.foundation.gridframework.CertificateKeystoreDetails.createKeyStore(CertificateKeystoreDetails.java:91)
   at com.realops.foundation.gridframework.CertificatePersistorImpl.loadCertificate(CertificatePersistorImpl.java:99)
   at com.bmc.ao.foundation.esb.ESBNetwork.connect(ESBNetwork.java:85)

Incorrect/invalid keystore password error

The following error is displayed in the installation logs when the keystore password entered is incorrect:

06 Jul 2022 02:10:45,070 [Thread=AMP - ESB Network Initializer - 1] ERROR ESBNetwork      : An error occurred while loading the certificate.
com.realops.foundation.gridframework.PersistCertificateFailedException: An error occurred while loading the certificate.
   at com.realops.foundation.gridframework.CertificateKeystoreDetails.getKeyStoreDetailsMap(CertificateKeystoreDetails.java:246)
   at com.realops.foundation.gridframework.CertificateKeystoreDetails.getKeyStoreDetails(CertificateKeystoreDetails.java:108)
   at com.realops.foundation.gridframework.CertificatePersistorImpl.loadCertificate(CertificatePersistorImpl.java:100)
   at com.bmc.ao.foundation.esb.ESBNetwork.connect(ESBNetwork.java:85)
   at com.bmc.repository.server.esb.ESBNetworkInitializationTask.run(ESBNetworkInitializationTask.java:109)
   at com.bmc.repository.server.esb.ESBNetworkInitializer$1.doInitializeLoop(ESBNetworkInitializer.java:89)
   at com.bmc.repository.server.esb.ESBNetworkInitializer$1.run(ESBNetworkInitializer.java:65)
   at java.lang.Thread.run(Thread.java:750)
Caused by: java.io.IOException: Keystore was tampered with, or password was incorrect
   at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:792)
   at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:57)
   at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224)
   at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:71)
   at java.security.KeyStore.load(KeyStore.java:1445)
   at com.realops.foundation.gridframework.CertificateKeystoreDetails.getKeyStoreDetailsMap(CertificateKeystoreDetails.java:237)
    ... 7 more
Caused by: java.security.UnrecoverableKeyException: Password verification failed
   at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:790)
    ... 12 more

Workaround

To rectify these errors, do the following:

  1. Navigate to the <peer>/config/ location.
  2. Open the jms-ssl-configuration.xml file and update it with the correct certificate.keystore path and valid password.

    Example

    MicrosoftTeams-image (12).png

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*