An error occurs in SAS® Visual Investigator while trying to expand a data store or creating a new data store


Expanding the Data Store Error

When attempting to expand the Data Store to select an existing one while creating a new External Entity, no Data Stores are presented, and an error is generated.

Expanding the Data Store, but no Data Stores are presented

An error similar to the following occurs in the svi-datahub log:

{"version":1,"timeStamp":"2025-01-09T06:35:37.281Z","level":"error","source":"sas-svi-datahub","message":"Exception details: request: /admin/dataStores/all, parameters: ","properties":{"logger":"com.sas.fcs.datahub.controller.MetahubSharedExceptionHandler",
"thread":"https-jsse-nio-8080-exec-2","__session":"53739cc4-7b81-4e4a-870f-1c2d16291664","username":"123456"}}

{"version":1,"timeStamp":"2025-01-09T06:35:37.281Z","level":"error","source":"sas-svi-datahub","message":"500 : \"{\"errorCode\":12309,\"message\":\"An error occurred while decrypting the secrets member for the identity \\\"sas.svi-datahub\\\" in the domain \\\"DEFAULT_STORE\\\". Error: Tag mismatch!\",\"details\":[\"path: /credentials/domains/DEFAULT_STORE/secrets\"],\"links\":[],\"version\":2,\"httpStatusCode\":500}\"\norg.springframework.web.client.
HttpServerErrorException$InternalServerError: 500 : \"{\"errorCode\":12309,\"message\":\"An error occurred while decrypting the secrets member for the identity \\\"sas.svi-datahub\\\" in the domain \\\"DEFAULT_STORE\\\". Error: Tag mismatch!\",\"details\":[\"path: /credentials/domains/DEFAULT_STORE/secrets\"],\"links\":[],\"version\":2,\"httpStatusCode\":500}\"\n\tat

Accessing or Creating a Data Store Error

Errors might occur when attempting to access the Data Stores tab.

A system internal error occurred. Please contact support team with details. Request URL: /svi-datahub/admin/dataStores/all Status: 500

Errors also occur when trying to create a new Data Store, as it does not appear to be listed. 

The SAS Visual Invesitgator Data Store service is unavailable. Please contact your system administrator. Http failure response for https://<Hostname>/svi-datahub/admin/dataStores: 409 OK The data store name "XTPO" is already in use.

An error is also displayed in the logs since you are trying to create a Data Store that is already present in back-end, but it does not appear to be listed. Here is an example:

{"version":1,"timeStamp":"2025-01-09T06:37:10.201Z","level":"error","source":"sas-svi-datahub","message":"The data store name \"XPTO\" is already in use.\ncom.sas.fcs.datahub.UniqueConstraintViolationException: The data store name \"XPTO\" is already in use.\n\tat

Root Cause

These errors occur when the Credential Service attempts to decrypt the credentials member for the specified identity (sas.svi-datahub) and fails due to a mismatch in encryption keys. Common scenarios leading to this issue include the following:

Workaround

To circumvent this issue, ensure that the Consul key matches the Postgres key by completing the following steps:

  1. Use the following curl commands to remove the existing credentials:

    curl -k -X DELETE "https://<hostname>/credentials/domains/DEFAULT_STORE/clients/sas.svi-datahub" -H "Authorization: Bearer $access_token" 

    curl -k -X DELETE "https://<hostname>/credentials/domains/ALERT_STORE/clients/sas.svi-datahub" -H "Authorization: Bearer $access_token"


  2.  Confirm that the credentials have been removed by accessing the following URLs:
      • https://<hostname>/credentials/domains/DEFAULT_STORE/clients/sas.svi-datahub
      • https://<hostname>/credentials/domains/ALERT_STORE/clients/sas.svi-datahub

        The expected response for deleted credentials is as follows:

        {

          "errorCode": 12302,

          "message": "The credential for the client \"sas.svi-datahub\" in the domain \"DEFAULT_STORE\" does not exist.",

          "details": ["path: credentials/domains/DEFAULT_STORE/clients/sas.svi-datahub"],

          "links": [],

          "version": 2,

          "httpStatusCode": 404

        }

  3. Next, monitor the credentials regeneration. After a few minutes, the credentials should regenerate automatically. If they do not, restart the Datahub pod. Note: The expected response for newly generated credentials is as follows:

    {

      "id": 101601,

      "createdBy": "123456",

      "createdAt": "2024-12-30T10:17:19.247Z",

      "lastUpdatedBy": "123456",

      "lastUpdatedAt": "2024-12-30T10:17:19.247Z",

      "name": "XPTO",

      ...

      "CasDistributedDataLoadSupported": true

    }

Important Notes

Note: This issue affects SAS Visual Investigator on the SAS Viya platform and could occur in any product release.