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

Spectrum Network Observability

Issue/Introduction

When running DX NetOps Spectrum, Java clients connect but users may see the following error message when failing 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

In 25.4.3 after upgrading from 24.3.12 you may see in <SPECROOT>/webtomcat/bin/logs/webswing.log

 ERROR [https-jsse-nio-9444-exec-20] (ApplicationWebSocketConnectionEndpoint.java:164) Websocket error from app connection, session [3], instanceId [oneclickwebapp_anonym_3eda1256e139_1767794595819], sessionPool [<OC hostname>] null
java.io.EOFException: null
 ERROR [https-jsse-nio-9444-exec-25] (ApplicationWebSocketConnectionEndpoint.java:164) Websocket error from app connection, session [5], instanceId [oneclickwebapp_anonym_3eda1256e139_1767794613685], sessionPool  [<OC hostname>]  Connection reset
java.net.SocketException: Connection reset
 
<SPECROOT>/webtomcat/logs/catalina.out
 
2026-01-07 15:03:23,611 INFO  [SP Reconnect Scheduler] (ClusterWebSocketConnectionImpl.java:157) Starting websocket connection to server [wss://<OC hostname>:9444/spectrum].
2026-01-07 15:03:23,631 ERROR [SP Reconnect Scheduler] (SessionPoolInstanceServiceImpl.java:309) Failed to connect websocket to server [wss://<OC hostname>:9444/spectrum]! SSL handshake has failed
2026-01-07 15:03:26,632 INFO  [SP Reconnect Scheduler-2] (SessionPoolInstanceServiceImpl.java:303) Reconnecting websocket to server [wss://<OC hostname>:9444/spectrum], retry #4
2026-01-07 15:03:26,632 INFO  [SP Reconnect Scheduler-2] (ClusterWebSocketConnectionImpl.java:157) Starting websocket connection to server [wss://<OC hostname>:9444/spectrum].
2026-01-07 15:03:26,650 ERROR [SP Reconnect Scheduler-2] (SessionPoolInstanceServiceImpl.java:309) Failed to connect websocket to server [wss://<OC hostname>:9444/spectrum]! SSL handshake has failed
2026-01-07 15:03:29,651 INFO  [SP Reconnect Scheduler-2] (SessionPoolInstanceServiceImpl.java:303) Reconnecting websocket to server [wss://<OC hostname>:9444/spectrum], retry #5
2026-01-07 15:03:29,651 INFO  [SP Reconnect Scheduler-2] (ClusterWebSocketConnectionImpl.java:157) Starting websocket connection to server [wss://<OC hostname>:9444/spectrum].
2026-01-07 15:03:29,695 ERROR [SP Reconnect Scheduler-2] (SessionPoolInstanceServiceImpl.java:309) Failed to connect websocket to server [wss://<OC hostname>:9444/spectrum]! SSL handshake has failed
2026-01-07 15:03:29,696 INFO  [SP Reconnect Scheduler-2] (SessionPoolInstanceServiceImpl.java:343) Will not try to reconnect anymore, too many retries [5].
2026-01-07 15:03:29,985 INFO  [SP Watcher] (SessionPoolInstanceServiceImpl.java:286) No active websocket connections. Shutting down. Killing any running instances.

Environment

All supported DX NetOps Spectrum releases

Cause

Misconfigured vmArgs entry in the $SPECROOT/webtomcat/webswing/webswing.config file or the $SPECROOT/webtomcat/bin/webswing-app.config file

Resolution

To resolve this make the following changes.
 
NetOps 24.3.10 and below:
  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.

NetOps 24.3.11 and above:

  1. Stop tomcat and webtomcat services. Ensure they're down.
  2. Back up the $SPECROOT/webtomcat/bin/webswing-app.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.

NetOps 25.4.3 and above:

You can run sslConfig.sh which will repair the above problem on 25.4.3

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.