Spectrum OneClick WebApp Could Not Connect to Web Server
search cancel

Spectrum OneClick WebApp Could Not Connect to Web Server

book

Article ID: 252927

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

When running DX NetOps Spectrum  users may see the following error message when trying to launch the OneClick WebApp:

SPC-OCC-10251: Could not connect to Web server at http(s)://<HOSTNAME>:<PORT>

When reviewing the <SPECROOT>/webtomcat/bin/logs/webswing.log file, you may see the following error:

2024-01-12 13:17:19,952 ERROR [Webswing Process Handler] (SwingProcessImpl.java:218) [oneclickwebapp_anonym_b70ebaf1ee84_1705065432487] Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm:

2024-01-12 13:17:19,952 ERROR [Webswing Process Handler] (SwingProcessImpl.java:218) [oneclickwebapp_anonym_b70ebaf1ee84_1705065432487] at com.aprisma.util.net.http.HttpConnection.createSocket(HttpConnection.java:580)
2024-01-12 13:17:19,952 ERROR [Webswing Process Handler] (SwingProcessImpl.java:218) [oneclickwebapp_anonym_b70ebaf1ee84_1705065432487] ... 25 more
2024-01-12 13:17:19,952 ERROR [Webswing Process Handler] (SwingProcessImpl.java:218) [oneclickwebapp_anonym_b70ebaf1ee84_1705065432487] Caused by: java.security.UnrecoverableKeyException: Cannot recover key

An alternative error that may appear in the webtomcat webswing.log:

2024-12-17 17:49:29,751 INFO  [Webswing Process Handler] (SwingProcessImpl.java:233) [oneclickwebapp_anonym_bbbd7f84d6_1734475768242] ERROR: Failed to connect websocket to server [wss://<OC_Host>:9443/spectrum/oneclickwebapp/async/app-bin]! -> Connection failed. |
2024-12-17 17:49:29,752 INFO  [Webswing Process Handler] (SwingProcessImpl.java:233) [oneclickwebapp_anonym_bbbd7f84d6_1734475768242] ERROR: Exiting application because it could not connect to server -> jakarta.websocket.DeploymentException: Connection failed.
...
2024-12-17 17:49:29,753 INFO  [Webswing Process Handler] (SwingProcessImpl.java:233) [oneclickwebapp_anonym_bbbd7f84d6_1734475768242] Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Environment

All supported DX NetOps Spectrum releases

Cause

Misconfigured vmArgs entry in the $SPECROOT/webtomcat/webswing/webswing.config file.

Resolution

To resolve this make the following changes.
  1. Stop tomcat and webtomcat services. Ensure they're down.
  2. Back up the $SPECROOT/webtomcat/webswing/webswing.config file.
  3. Open it and find the swingConfig sections vmArgs line.
    1. Remove the following entry in the vmArgs line

      -Dtomcat.server.xml=${SPECROOT}/tomcat/conf/server.xml

    2. Replace it with the following where <PASSWD> is the value of the keystorePass:

      -Djavax.net.ssl.trustStore=${SPECROOT}/custom/keystore/cacerts -Djavax.net.ssl.trustStorePassword=<PASSWD>

  4. Save the changes to the file.
  5. Restart tomcat and test the WebApp access again.

Additional Information

Important that if the keystore password is a complex password with special characters, the password DOES NOT need to be escaped with double or single quotes.