22.2.7/22.2.8/22.2.9 upgrade WebApp is not working
search cancel

22.2.7/22.2.8/22.2.9 upgrade WebApp is not working

book

Article ID: 267252

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

Upgraded to 22.2.7 / 22.2.8 or 22.2.9 and the webapp is not loading.  

Errors seen in the $SPECROOT/webtomcat/logs/catalina.out:

2023-06-02 12:01:32,748 INFO  [Admin Websocket Service Timer] (AdminWebSocketServiceImpl.java:358) Websocket closed to server id [null], url [ws://rhel8:9443/spectrum]. Reconnect in 5000ms.
2023-06-02 12:01:36,230 WARN  [Admin Websocket Service Timer] (AdminWebSocketConnectionImpl.java:164) Websocket connection to server [ws://rhel8:9443/spectrum] is not open! Ignoring send message.
2023-06-02 12:01:37,748 INFO  [Admin Websocket Service Timer] (AdminWebSocketConnectionImpl.java:135) Starting websocket connection to server [ws://rhel8:9443/spectrum].
2023-06-02 12:01:37,758 ERROR [Admin Websocket Service Timer] (AdminWebSocketServiceImpl.java:290) Failed to connect websocket to server [ws://rhel8:9443/spectrum]! Failed to connect to websocket
2023-06-02 12:01:37,759 INFO  [Admin Websocket Service Timer] (AdminWebSocketServiceImpl.java:358) Websocket closed to server id [null], url [ws://rhel8:9443/spectrum]. Reconnect in 5000ms.
2023-06-02 12:01:41,230 WARN  [Admin Websocket Service Timer] (AdminWebSocketConnectionImpl.java:164) Websocket connection to server [ws://rhel8:9443/spectrum] is not open! Ignoring send message.
2023-06-02 12:01:42,760 INFO  [Admin Websocket Service Timer] (AdminWebSocketConnectionImpl.java:135) Starting websocket connection to server [ws://rhel8:9443/spectrum].
2023-06-02 12:01:42,775 ERROR [Admin Websocket Service Timer] (AdminWebSocketServiceImpl.java:290) Failed to connect websocket to server [ws://rhel8:9443/spectrum]! Failed to connect to websocket

Environment

Release : 22.2.x

Cause

In the $SPECROOT/webtomcat/webswing/webswing.config file there is a JSON syntax error.

However, it could also be an error in the server.xml file if the CAC integration is in use.

 

Resolution

Edit the webswing.config file and remove the trailing comma here:

"adminConsoleUrl" : "http://rhel8:9443/admin",

Top section of the file should look like:

{
  "/" : {
    "path" : "/",
    "security" : {
      "module" : "EMBEDED",
      "config" : {
        "users" : [ {
          "username" : "spectrum",
          "password" : "$xxxxxxx",
          "roles" : [ "admin" ]
        } ]
      }
    },
    "webFolder" : "${SPECROOT}/tomcat/webapps",
    "langFolder" : "${SPECROOT}/webtomcat/webswing/lang",
    "homeDir" : "${user.dir}",
    "allowedCorsOrigins" : [ "*" ],
        "adminConsoleUrl" : "http://rhel8:9443/admin"
  },

 

If using CAC:

The $SPECROOT/tomcat/conf/server.xml file connector needs to have clientAuth=true.

The $SPECROOT/webtomcat/conf/server.xml file connector needs to have clientAuth=false.

This is ONLY when CAC (Common Access Card) is in use.

Additional Information

To check if the file is valid, use:

 cat webswing.config | python3 -m json.tool

..

user@host:/mnt/c/webswing$ cat webswing.config | python3 -m json.tool
Expecting property name enclosed in double quotes: line 19 column 3 (char 513)
user@host:/mnt/c/webswing$

..

 

This is fixed out of box in Spectrum 22.2.10.