Unable to connect browser to Clearwell Interface with an error showing ERROR_CONNECTION_REFUSED or ERR_TIMED_OUT.

book

Article ID: 100053003

calendar_today

Updated On:

Description

Error Message

The browser shows the following ERROR_CONNECTION_REFUSED error:

or the ERR_TIMED_OUT error message:

The latest catalina.YYYY-MM-DD.log file may show one of the two following errors depending what was done:
30-Apr-2022 13:57:58.615 SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[com.teneo.esa.common.security.CustomHttp11Nio2Protocol-443]]
    org.apache.catalina.LifecycleException: Protocol handler initialization failed
        at org.apache.catalina.connector.Connector.initInternal(Connector.java:1077)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
        at org.apache.catalina.core.StandardService.initInternal(StandardService.java:552)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
        at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:848)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:639)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:662)
        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:302)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:472)
    Caused by: java.lang.IllegalArgumentException: Failed to load keystore type [BCFKS] with path [c:\jdk-8u251-windows-x64/jre/lib/security/cacerts.bcfks] due to [Illegal character in opaque part at index 2: c:\jdk-8u251-windows-x64/jre/lib/security/cacerts.bcfks]
        at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:100)
        at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:72)
        at org.apache.tomcat.util.net.Nio2Endpoint.bind(Nio2Endpoint.java:158)
        at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1118)
        at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:222)
        at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:599)
        at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:80)
        at com.teneo.esa.common.security.CustomHttp11Nio2Protocol.init(CustomHttp11Nio2Protocol.java:63)
        at org.apache.catalina.connector.Connector.initInternal(Connector.java:1075)
        ... 13 more

or this error:
29-Apr-2022 18:23:47.305 SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[com.teneo.esa.common.security.CustomHttp11Nio2Protocol-443]]
    org.apache.catalina.LifecycleException: Protocol handler initialization failed
        at org.apache.catalina.connector.Connector.initInternal(Connector.java:1076)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
        at org.apache.catalina.core.StandardService.initInternal(StandardService.java:552)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
        at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:843)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:639)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:662)
        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:305)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
    Caused by: java.lang.IllegalArgumentException: Cannot obtain resource for specified location [C:\jdk-8u321-windows-x64/jre/lib/security/cacerts.bcfks]: no readable file or this is not a resolvable URI
        at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:100)
        at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:72)
        at org.apache.tomcat.util.net.Nio2Endpoint.bind(Nio2Endpoint.java:157)
        at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1147)
        at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:222)
        at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:599)
        at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:80)
        at com.teneo.esa.common.security.CustomHttp11Nio2Protocol.init(CustomHttp11Nio2Protocol.java:99)
        at org.apache.catalina.connector.Connector.initInternal(Connector.java:1074)
        ... 13 more

Cause

The following are known causes for this issue:

  • Incorrectly converting the jdk cacerts from jks to bcfks format into new file cacerts.bcfks caused by improper parameters or selections for a keystore tool.
  • The cacerts.bcfks is corrupted
  • The cacerts.bcfks is missing
  • Customer reinstalled the JDKs but the cacerts has not been converted yet so cacerts.bcfks does is missing.
  • Improper installation of java development kits
  • Improper/missing environment paths for java

Resolution

NOTE:  When referencing the java development kit path there should be 32bit and 64bit versions on the root of the C: drive.  The folder name contains the version, platform, and the bit version of the java development kit.  For simplicity the reference to the JDKs that install with Clearwell 10.0 which are JDK 8 Update 251 32bit and 64bit.  The installed version could be different.  These install to c:\jdk-8u251-windows-x32 and c:\jdk-8u251-windows-x64.  This issue is related to the cacerts and cacerts.bcfks files ONLY in the 64bit version of JDK so the focus of solution will be on the C:\jdk-8u251-windows-x64 folder.  The cacerts and cacerts.bcfks (if not missing) should be located within the C:\jdk-8u251-windows-x64\jre\lib\security folder.

  1. Use Clearwell Utility and select option 3. Stop All Clearwell Services
  2. Go to Control Panel, and use Programs and Features to uninstall the two Java SE Development Kits for 32bit and 64bit.
  3. Find the Clearwell software installer for the same version of the software that is installed, if not extracted go ahead and extract it and go into the folder
  4. Then go into the packages\JDK\ folder.  Example for 10.0 extracted on root of D: drive would be D:\20210312_1530_V100\packages\JDK\1.8.0_251.
  5. Double click to execute the file installJDK.bat to install both 32bit and 64bit versions of java.
  6. Open a command prompt window
  7. Go to the drive Clearwell is installed on.  Example:  D:
  8. Go to your current Clearwell binary folder.  Example:  CD D:\CW\V100
  9. Execute the following commands:
    b migrate-jdk-cert
  10. Use Clearwell Utility and select option 4. Start All Clearwell Services
  11. Test that the browser can now connect as expected to Clearwell GUI.

Note:  For a additional method that does not require uninstalling/reinstalling Java Development Kit see the following technote here.

Issue/Introduction

Unable to connect a web browser to the Clearwell User Interface when attempting to administer the Appliance. The browser will display ERROR_CONNECTION_REFUSED or ERR_TIMED_OUT messages instead.