Purpose (problem description)

When trying to connect to the HD portal,with the credentials, after running some consolidation cmd lines,the following error occurs :

Application Analytics Dashboard

You application failed to start due to a "bad connection definition"
Please contact your administrator for resolution Symptoms
The database connection is not defined or has failed to load.
Possible causes includes:
Configuration issue
Database server issue
Available connections

Observed in CAST AIP
Release
Yes/No
8.3.x(tick)
8.2.x(tick)
8.1.x(tick)
8.0.x(tick)
7.3.x(tick)
7.2.x(tick)
7.0.x

(error) 

Observed on RDBMS
RDBMS
Yes/No
Oracle Server (error)
Microsoft SQL Server (error)
CSS3(tick)
CSS2(tick)
CSS1(error)
Action Pan
  1. Identify the corrupted central
  2. Check for corruptions in the consolidated central. If you find out some corruption, take a backup of your Central Base before applying the fix given in this page
  3. If your case is different from the step3 or if the issue still occurs after applying the solution then please contact CAST Technical Support by providing the Relevant input

  4. For CAST technical support only. Please refer to the page - Health Dashboard - Information - How to reproduce HD issues


If there is snapshot generation in progress on the Central Base which you are consolidating on the HD (the HD consolidation process and snapshot generation on CB are running in parallel ) then the CB would be containing inconsistent data. Make sure that you do not perform the consolidation until the snapshot generation is completed.

If you have performed the HD consolidation process and snapshot generation on CB in parallel, then reset the HD and re-do the consolidation, after the snapshot generation has been completed.

Identify the corrupted central

If you are getting this error after consolidating several centrals, you need first to identify the faulty central. For this you need to do the follwing steps:

  1. Start from a fresh HD
  2. Do the consolidation of the first central
  3. Once the consoliddation done successfully, Check if you can connect to the HD central without getting any error
  4. If you get no error, you can go back to step 2 consolidating next central and repeat the same check
  5. If you are getting the error, the last central you were consolidating is may be corrupted. Please follow above steps to check the corruption and to repare it
  6. Redo all the steps for step 1 for the remaining central as you may have several corrupted centrals


Check for corruptions in the consolidated central

  1.  Missing types for some objects: SQL Queries - CAST Measure Base - Checking and removing corruptions - Objects with missing types
  2. DSS_OBJECT_INFO/DSS_LINK_INFO were correct, but the DSS_OBJECTS table was not containing some objects: Corruption due to DSS_OBJECTS table not containing some objects that are present in DSS_OBJECT_INFO/DSS_LINK_INFO
  3. missing technological objects: SQL Queries - CAST Measure Base - Checking and removing corruptions - Missing technological objects
  4. Missing links in DSS_LINKS table: Corruption due to missing links in DSS_LINKS table
  5. Ghost technologies: SQL Queries - CAST Measure Base - Checking and removing corruptions - Ghost technologies
  6. Ghost objects: SQL Queries - CAST Central Base - Checking and removing corruptions in CB - Ghost objects.


Case 8: missing functional module

 

Error Raised by the HD consolidation:
HDConsolidation Copyright (c) 2014 CAST
org.postgresql.util.PSQLException: ERROR: null value in column "object_name" violates not-null constraint
Detail: Failing row contains (20, -1, null, null, null).

 

From the error message, the object id involved in the Measurement database is 20.

To check what is the object id in the CB that leads to the issue, use the query below :

select * from <Your_Measurement_DataBase>.dss_translation_table where object_id = 20

 

--> Nothing in the DSS_OBJECTS table.


 


select * from <Your_Central_DB>.dss_object_info where object_id = 321015

--> 

 

snapshot_idobject_idobject_type_idobject_checksum
35321015200000
36321015200000
37321015200000
38321015200000

 

This is a corruption in the Central Database as there is inconsistency between the dss_objects table and dss_object_info table : All objects in dss_object_info must be present in dss_objects table(this table contains the object name)

In this case, the object missing is a functional module (Object Type = 20000). To resolve the corruption, execute the query below to add a new line in the DSS_OBJECTS table :

 

 


set search_path to <Your_Central_DB>
 insert into DSS_OBJECTS (OBJECT_ID, OBJECT_TYPE_ID, OBJECT_NAME, OBJECT_DESCRIPTION, OBJECT_FULL_NAME) 
select distinct doi.OBJECT_ID, doi.OBJECT_TYPE_ID, dot.OBJECT_TYPE_NAME || ' Missing' as OBJECT_NAME, 
dot.OBJECT_TYPE_NAME || ' object that is missing' as OBJECT_DESCRIPTION, dot.OBJECT_TYPE_NAME as OBJECT_FULL_NAME 
from DSS_LINK_INFO dli 
join DSS_OBJECT_INFO doi 
on doi.SNAPSHOT_ID = dli.SNAPSHOT_ID and doi.OBJECT_ID = dli.PREVIOUS_OBJECT_ID 
join DSS_OBJECT_TYPES dot 
on dot.OBJECT_TYPE_ID = doi.OBJECT_TYPE_ID 
left join DSS_OBJECTS dos 
on dos.OBJECT_ID = dli.NEXT_OBJECT_ID 
where dli.LINK_TYPE_ID = 2 and doi.OBJECT_ID = <The object missing in dss_objects table>

In the example, the <The object missing in dss_objects table> = 321015

Then launch a new consolidation of the application in the Measurement Service

 

Case 9: applications are consolidated with out a snapshot

The problem may be because that there might be some applications which were consolidated with out a snapshot.

To know the snapshots which doesn't have the snapshots run following query on the measurement base

select o.object_name as HD_APPLICATION_NAME, o.OBJECT_ID as HD_APPLICATION_ID, tt.SITE_OBJECT_ID as ADG_APPLICATION_ID, s.VERSION as ADG_VERSION, s.NAME as ADG_DBNAME 
from DSS_OBJECTS o 
join DSS_TRANSLATION_TABLE tt 
on tt.OBJECT_ID = o.OBJECT_ID 
join VIEWER_SITES s 
on s.ID = tt.SITE_ID 
where o.OBJECT_TYPE_ID = -102
and not exists(select * from DSS_SNAPSHOTS ss where ss.application_id = o.object_id)
order by o.object_name

The workaround is to remove applications with no snapshot before doing consolidation. This issue is fixed in version 7.2.5 where HD is more robust in dealing with those centrals which have no snapshot.

Notes/Comments


 

Related Pages