AIP Console - Application Onboarding/Delivery - Add version - Install extension step - Error - MODULMSG - Job execution SQL Error - ERROR - relation SCHEMA_NAME_local.lck does not exist


Purpose

This page will help you to solve problems related to failure at the install extension step while adding a version of an application to the CAST AIP Console. The error encountered is  Error MODULMSG ; Job execution SQL Error: ERROR: relation "SCHEMA_NAME_local.lck" does not exist.

Applicable Platform

AIP Platform

Yes/No

CAST AIP 8.3(tick) 
AIP Console VersionYes/No
AIP Console 1.8.x  or greater(tick)
Action Plan

If while adding a version in AIP Console, it fails at the step install extensions:  


with below error in the install extensions log file:

AIP Console: Application  failing on install extensions
With the following error:

2022-04-29 17:37:24.267724 Information MODULMSG ; Job execution Command line:-APP(-NOGUI) -REMOVE_LOCKS(management:=XYZ_mngt) -CONNECT_STRING(<<anonymized value>>) "-LOG("D:\AipNode\data\logs\external_logs\68e58374-cc81-4484-9cb4-964804f41c24\install_extensions\remove-servman-lock.castlog-20220429-173723.txt", -IMMEDIATE)" 0 ; 0 0 0 [Module name] 0 0
2022-04-29 17:37:24.268696 Information MODULMSG ; Job execution Starting command REMOVE_LOCKS 0 ; 0 0 0 [Module name] 0 0
2022-04-29 17:37:26.247220 Error MODULMSG ; Job execution SQL Error: ERROR: relation "XYZ_local.lck" does not exist.

0 ; 0 0 servman\smsqlstart.cpp 139 [Module name] 0 0
2022-04-29 17:37:26.247220 Error MODULMSG ; Job execution SQL Error: LINE 1: delete from XYZ_local.Lck.

0 ; 0 0 servman\smsqlstart.cpp 139 [Module name] 0 0
2022-04-29 17:37:26.247220 Error MODULMSG ; Job execution SQL Error: ^ (Severity 1, Msg No 1).

0 ; 0 0 servman\smsqlstart.cpp 129 [Module name] 0 0
2022-04-29 17:37:26.496241 Information MODULMSG ; Job execution Command ended with error. 0 ; 0 0 0 [Module name] 0

Then as a workaround follow the steps described below.

  1. We need to check if the "lck" table exists in your local schema(knowledge base)
     
    Please check the output of the below two queries:

    select * from <Schema_name_local>.lck;
    SELECT * FROM information_schema.tables where table_schema ='<Schema_name_local>'
  2. If the output is :

    ERROR: relation "Schema_name_local.lck" does not exist

    It confirms the 'lck' table is missing from the local knowledge base schema.
     
    To solve this issue :

    1. Back up your schemas.
    2. Run the below script in the local base with <schema_name_local> replaced with your local schema name

     

    -- Table: <schema_name_local>.lck
    
    -- DROP TABLE <schema_name_local>.lck;
    
    CREATE TABLE <schema_name_local>.lck
    (
       spid integer NOT NULL,
       idkey integer NOT NULL,
       lcktyp integer NOT NULL,
       lckdat timestamp without time zone NOT NULL,
       lckcnt integer NOT NULL,
       idusr character(3) COLLATE pg_catalog."default" NOT NULL,
       iddbe integer NOT NULL
    )
    WITH (
       OIDS = FALSE
    )
    TABLESPACE pg_default;
    
    ALTER TABLE <schema_name_local>.lck
       OWNER to operator;
    
    -- Index: lck_idkeylcktyp
    
    -- DROP INDEX <schema_name_local>.lck_idkeylcktyp;
    
    CREATE UNIQUE INDEX lck_idkeylcktyp
       ON <schema_name_local>.lck USING btree
       (idkey, lcktyp, spid)
       TABLESPACE pg_default;
    
    -- Index: lck_spididkey
    
    -- DROP INDEX <schema_name_local>.lck_spididkey;
    
    CREATE UNIQUE INDEX lck_spididkey
       ON <schema_name_local>.lck USING btree
       (spid, idkey, lcktyp)
       TABLESPACE pg_default; 
    
  3. Now restart the AIP node and resync your application and add version again.
  4. If the problem you are facing do not match any case listed on this page, report your problem to CAST Technical Support and provide the following Relevant input for CAST Technical Support to reproduce the issue.                
Notes/comments
Ticket # 35779
Related Pages