Description

 When opening up a connection profile to CAST- MS, the following error is encountered "Incorrect data consistency between databases"

Please see the screenshot below: 

Error message in the CAST-MS Log - 

ERR: 2020-05-27 16:21:05:     cast.pmc.startup.wrongconsistencydata

ERR: 2020-05-27 16:21:05: Incorrect data consistency between databases. Check CAST-MS log file for more details. CAST-MS could not be launched.

                            com.castsoftware.java.ExternalException:Incorrect data consistency between databases. Check CAST-MS log file for more details. CAST-MS could not be launched.

Observed in CAST AIP


Release
Yes/No
8.3.x(tick) x<25
8.2.x(tick)
8.1.x(tick)
8.0.x(tick)
7.3.x(tick)
Observed on RDBMS
RDBMS
Yes/No
Oracle Server (tick)
Microsoft SQL Server (tick)
CSS2 (tick)
Step by Step Scenario

Below is the cause leading to the problem:

  1. Make changes to the triplet like dropping the Local and Central base without removing them from CAST-MS. 
  2. Restoring only a part of a triplet and not as a whole. 

After  the above steps  the error is seen when

  1. The connection profile to start CAST-MS is selected.
Impact of the Problem

The impact of the problem on the analysis or the dashboard is:

  1. Crash, when saving the results of an analysis on the Local Base
  2. Loss of data on the KB (Like objects, modules, links)
  3. Objects changing types and technology on the Central Base
Action Plan

The inconsistencies are due to the way synchronization is achieved between the AIP schema's.

Most of the time, these inconsistencies are observed after some undocumented actions are performed on the schema's.

Scenario - When you need to replace Local Base / Central Base to the existing triplet when the triplet is corrupt. 

  1. Retrieve the UUID of the Local Base / Central Base you want to replace by running the following query on the Management Base: 

Query to be run on the Management Schema

Retrieve the UUID of Local Base
select distinct cdf.Field_Value
  from CMS_Inf_CSS_LocalDB cicld
  join CMS_DynamicFields cdf
  on cdf.Object_Id = cicld.Object_Id
   and cdf.Field_GUID = 'entry'
  join CMS_Portf_Application cpa
    on cpa.LocalDB_Id = cicld.Object_Id
 where cpa.Object_Name = [Application Name]
   and cicld.Object_Name = [Local Schema Name];
Result Of Query


Retrieve the UUID of Central Base
select distinct cdf.Field_Value
  from CMS_Inf_CSS_CentralDB cicld
  join CMS_DynamicFields cdf
    on cdf.Object_Id = cicld.Object_Id
   and cdf.Field_GUID = 'entry'
  join CMS_Portf_System cps
    on cps.Central_Id = cicld.Object_Id
  join CMS_ObjectLinks col
    on col.Caller_Id = cps.Object_Id
   and col.Symbol = 'applications'
  join CMS_Portf_Application cpa
    on cpa.Object_Id = col.Callee_Id
 where cpa.Object_Name = [Application Name]
   and cicld.Object_Name = [Central Schema Name];
Result Of Query

     2. In CAST-MS, un-register the Local Base and Central Base from the application from the Execute Tab. 

                  For the Local Base, Click on "Change" and Select the option "None". Click Finish.

                  For the Central Base, Click on the Red Cross Mark which can be seen above the Dashboard services. 

     3. Close CAST-MS

     4. Clean up the Management Base, details of the Local Base/ Central Base you have just unregistered by running the following statement on the Management Base:

Clean up Local/Central Base from MNGT
delete
  from CMS_Sync_Translation
  where EntryService = [Central Base UUID/ Local Base UUID (Results of the respective Central/Local Query from above)];

    5. Drop the Local/Central Base as necessary using Server Manager or PgAdmin.

    6. Create/Install the New Local/Central as necessary

    7. Open CAST-MS and connect to the Management Base. 

    8. Register the Local / Central Base in the Execute tab. 

Note: You can apply the workaround when replacing each schema or when replacing both together. 

If you are still unable to get CAST-MS to open, then you will have to add a new Local /Central Base to the Management Base from CAST-MS. 

    9. If you do not find the information you are looking for or solution for your problem, in this page, contact CAST Technical Support with the below Relevant Input for CAST Technical Support to reproduce the issue. 


Relevant Input

  1. Sherlock (CAST Support Tool (CST) - alias Sherlock) : Option to select are Export Cast Database (management database), Export logs, Export Configuration files
  2. Screenshots of the issue.
Notes/comments
Ticket # 23469
Related Pages