Error 'keystore password was incorrect' is seen in catalina.log file while configuring HTTPS on TIBCO Spotfire Server

Error 'keystore password was incorrect' is seen in catalina.log file while configuring HTTPS on TIBCO Spotfire Server

book

Article ID: KB0075721

calendar_today

Updated On:

Products Versions
Spotfire Server All Versions

Description

You may see the following error in catalina.log file while configuring HTTPS on the TIBCO Spotfire Server. 

01-Apr-2020 09:54:58.081 SEVERE [main] org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to initialize component [Connector[HTTP/1.1-443]]
    org.apache.catalina.LifecycleException: Protocol handler initialization failed
        at org.apache.catalina.connector.Connector.initInternal(Connector.java:983)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
        at org.apache.catalina.core.StandardService.initInternal(StandardService.java:533)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
        at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1059)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:584)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:607)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:304)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
    Caused by: java.lang.IllegalArgumentException: keystore password was incorrect
        at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:99)
        at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:71)
        at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:236)
        at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1119)
        at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1132)
        at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:557)
        at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:74)
        at org.apache.catalina.connector.Connector.initInternal(Connector.java:980)
        ... 13 more
    Caused by: java.io.IOException: keystore password was incorrect
        at sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2059)
        at java.security.KeyStore.load(KeyStore.java:1445)
        at org.apache.tomcat.util.security.KeyStoreUtil.load(KeyStoreUtil.java:69)
        at org.apache.tomcat.util.net.SSLUtilBase.getStore(SSLUtilBase.java:217)
        at org.apache.tomcat.util.net.SSLHostConfigCertificate.getCertificateKeystore(SSLHostConfigCertificate.java:206)
        at org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.java:280)
        at org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:247)
        at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:97)
        ... 20 more
    Caused by: java.security.UnrecoverableKeyException: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
        ... 28 more

        
 

Issue/Introduction

This article explains when the error 'keystore password was incorrect' is seen if the password mentioned in the server.xml for the connector 443 (HTTPS) is incorrect. Updating it to the correct password will help resolve the issue.

Resolution

To resolve, ensure to update the <certificateKeystorePassword> attribute with the correct password in the server.xml file located at "<TIBCO Spotfire server installation directory>\tomcat\conf" folder. 

Alternatively, you can perform the following to test the password:
  1. In Windows, double click on the .pfx file
  2. Select "Next" until you are asked to enter a password
  3. Check if the password is correct and matches the one in server.xml
If Windows will not accept the password then the TIBCO Spotfire Server will not either.

Additional Information

Doc: Manually editing server.xml file