After upgrading ARD hub to 3.2 I'm not able to load the Web UI URL

book

Article ID: 223164

calendar_today

Updated On:

Products

CA Agile Requirements Designer

Issue/Introduction

While attempting to go through the 3.2 ARD Hub manual upgrade procedures, I am getting an Internal Server (500) error when attempting to launch any of the Web UIs, including Keycloak. The service starts without issue, as does the microservices in Tomcat, I only noticed a problem when attempting to launch the UIs.

I followed the steps as documented in the ARD 3.2 documentation - https://techdocs.broadcom.com/us/en/ca-enterprise-software/devops/agile-requirements-designer/3-2/installing/install-ard-hub/install-ard-hub-manually.html

However, it is possible I missed a step. The error I am seeing in the server.log, after trying to reach the Keycloak Web UI is as follows:

2021-09-01 13:29:08,734 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-1) Uncaught server error: javax.ws.rs.core.UriBuilderException: RESTEASY003330: Failed to create URI: lvntest002359.bpc.broadcom.net:
    at [email protected]//org.jboss.resteasy.specimpl.ResteasyUriBuilder.buildFromValues(ResteasyUriBuilder.java:829)
    at [email protected]//org.jboss.resteasy.specimpl.ResteasyUriBuilder.build(ResteasyUriBuilder.java:811)
    at [email protected]//org.keycloak.models.KeycloakUriInfo.getBaseUri(KeycloakUriInfo.java:93)
    at [email protected]//org.keycloak.protocol.AuthorizationEndpointBase.checkSsl(AuthorizationEndpointBase.java:163)
    at [email protected]//org.keycloak.protocol.oidc.endpoints.AuthorizationEndpoint.process(AuthorizationEndpoint.java:133)
    ....
Caused by: java.net.URISyntaxException: Expected scheme-specific part at index 31: lvntest002359.bpc.broadcom.net:
    at java.base/java.net.URI$Parser.fail(URI.java:2915)
    at java.base/java.net.URI$Parser.failExpecting(URI.java:2921)
    at java.base/java.net.URI$Parser.parse(URI.java:3121)
    at java.base/java.net.URI.<init>(URI.java:600)
    at [email protected]//org.jboss.resteasy.specimpl.ResteasyUriBuilder.buildFromValues(ResteasyUriBuilder.java:820)
    ... 81 more

Cause

Prior to ARD 3.2, ARD Hub used Keycloak v 5.0.0. However, with ARD 3.2, you must install Keycloak v 13.0.1, which requires that you properly configure the frontendURL in the standalone.xml file. This error is seen when the frontendURL is not properly configured or contains a typo.

Environment

Windows and Linux (Non Docker Images)

Resolution

  1. Stop the Apache Tomcat service

  2. Stop the Wildfly (Keycloak) service

  3. Open the KEYCLOAK_HOME\standalone\configuration\standalone.xml file in the text editor of your choice
    .
  4. Search for frontendURL (Should be around line 341)

  5. Verify that the frontendURL has been defined properly. The line should look similar to the following:
    <property name="frontendUrl" value="${keycloak.frontendUrl:http://<TomcatHostname.mydomain.com>:<Tomcat_Port>/ard/api/iam/auth}"/>

    Where: <TomcatHostname.mydomain.com> is replaced with the fully qualified hostname of the machine hosting the Tomcat Web Server
                <Tomcat_Port> is replaced with the actual  listener port number for Tomcat

    For example: 
    <property name="frontendUrl" value="${keycloak.frontendUrl:http://lvntest001.broadcom.com:8080/ard/api/iam/auth}"/>

    Note: if you are using a client-side proxy, then use your Proxy_Server_Name as the hostname, and your Poxy_Port as the port number
             <property name="frontendUrl" value="${keycloak.frontendUrl:http://<ProxyHostname.mydomain.com>:<Proxy_Port>/ard/api/iam/auth}"/>

  6. After corrections have been made, save your changes to the file.

  7. Restore the Keycloak database from your backup file (as a precaution that something may have gone wrong with the database migration)

  8. Restart the Wildfly (Keycloak) service

  9. Restart the Apache Tomcat service

  10. Launch the ARD Web UI. 

Additional Information

The ARD 3.2 Hub upgrade steps can be found at https://techdocs.broadcom.com/us/en/ca-enterprise-software/devops/agile-requirements-designer/3-2/installing/install-ard-hub/upgrade-or-reconfigure-ard-hub.html