Skip to main content

Qlik Sense Repository won't start: Inactive lock existance check for database 'QSR' failed: permission denied for relation _locktable

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Daniele_Purrone
Support
Support

Qlik Sense Repository won't start: Inactive lock existance check for database 'QSR' failed: permission denied for relation _locktable

Last Update:

Jun 23, 2021 10:08:33 AM

Updated By:

Sonja_Bauernfeind

Created date:

Aug 16, 2018 10:06:37 AM

After restoring a database backup and attempting to start Qlik Sense you see the following errors in the repository log and QMC and the Hub will not work.


Logs showed these errors:

12    20180816T115644.772+0200    INFO    QlikServer1    System.Repository.Repository.QRSMain    16    1ddd3da9-3b36-426c-9064-606268c0e733    DOMAIN\qvservice    Connected to QSMQ database                1ddd3da9-3b36-426c-9064-606268c0e733

13    20180816T115644.886+0200    ERROR    QlikServer1    System.Repository.Repository.Core.Database.StartupLock    16    3c843de6-2490-4e74-ac81-ffba920d67ee    DOMAIN\qvservice    Inactive lock existance check for database 'QSR' failed: permission denied for relation _locktable                3c843de6-2490-4e74-ac81-ffba920d67ee

14    20180816T115644.905+0200    ERROR    QlikServer1    System.Repository.Repository.QRSMain    16    f1c4b85a-0cfd-416f-a4fe-e415c7dba3f5    DOMAIN\qvservice    Fatal exception    permission denied for relation _locktable↵↓Inactive lock existance check for database 'QSR' failed: permission denied for relation _locktable    NO-STACKTRACE↵↓   at Repository.Core.Database.QuerySupport.PgDatabaseQuerySupport.ProcessResult(String operation, PgOperationResult result)↵↓   at Repository.QRSMain.WaitForLock(Action action, TimeSpan interval)↵↓   at Repository.QRSMain.Main()        f1c4b85a-0cfd-416f-a4fe-e415c7dba3f5

15    20180816T115644.927+0200    ERROR    QlikServer1    System.Repository.Repository.Core.Database.StartupLock    16    c3036dcc-0cd3-4984-b02c-75c6bc4c5848    DOMAIN\qvservice    Removal of active lock for database 'QSR' failed: Failed to execute query: '↓⇔⇔⇔DELETE FROM _locktable↓⇔⇔⇔WHERE name = :p1 AND node = :p2 AND inactive = 'false'↓⇔⇔'. Exception: permission denied for relation _locktable                c3036dcc-0cd3-4984-b02c-75c6bc4c5848


After restoring a database backup Qlik Sense Repository Services is crashing immediately after starting the service.

Logs showed these errors:

1 26.28.0.0 20201214T211607.575+0200 INFO QlikServer1   b6b0d382-7151-433a-ae25-528ae2f05843 Command=Start repository;Result=0;ResultText=Success 0 0 0 INTERNAL System 0 Not available Repository Not available Not available Start repository 0 Validating certificates. b6b0d382-7151-433a-ae25-528ae2f05843

2 26.28.0.0 20201214T211619.409+0200 ERROR QlikServer1  00e7721a-7314-4836-bde7-cdbcd53a4760 Command=Start repository;Result=-2146233088;ResultText=Error: An exception was thrown while invoking the constructor 'Void .ctor(Qlik.Sense.Logging.IQSLogManager, Repository.Core.INodeConfig, Qlik.Sense.Communication.Security.ICertSetup, Qlik.Sense.Common.Communication.REST.Server.IRESTEngineFactory, Repository.Core.ISystemInformation, Qlik.Sense.Common.Logging.ILogMaster)' on type 'ApiService'. ---> An exception was thrown while invoking the constructor 'Void .ctor(Qlik.Sense.Common.ITypeResolver, System.Func`1[Repository.Core.Repository.Database.Common.IDatabaseContext], Autofac.ILifetimeScope, Repository.Core.Repository.Common.ITransactionUtility, Repository.Core.Repository.Common.IRepositoryEntityCache, Repository.Core.INodeConfig, Qlik.Sense.Logging.IQSLogManager, Repository.Core.Repository.Common.ILifetimeScopeEntityCache, Repository.Core.Repository.Common.IEntityFrameworkExtendedWrapper)' on type 'EntityTransactionRepository'. ---> An exception was thrown while invoking the constructor 'Void .ctor()' on type 'DatabaseContext'. ---> Failed to update MigrationLog table (See inner exception for details.) (See inner exception for details.) (See inner exception for details.) 0 0 0 INTERNAL System 0 Not available Repository Not available Not available Start repository -2146233088 An exception was thrown while invoking the constructor 'Void .ctor(Qlik.Sense.Common.ITypeResolver, System.Func`1[Repository.Core.Repository.Database.Common.IDatabaseContext], Autofac.ILifetimeScope, Repository.Core.Repository.Common.ITransactionUtility, Repository.Core.Repository.Common.IRepositoryEntityCache, Repository.Core.INodeConfig, Qlik.Sense.Logging.IQSLogManager, Repository.Core.Repository.Common.ILifetimeScopeEntityCache, Repository.Core.Repository.Common.IEntityFrameworkExtendedWrapper)' on type 'EntityTransactionRepository'. ---> An exception was thrown while invoking the constructor 'Void .ctor()' on type 'DatabaseContext'. ---> Failed to update MigrationLog table (See inner exception for details.) (See inner exception for details.) 00e7721a-7314-4836-bde7-cdbcd53a4760

3 26.28.0.0 20201214T211619.411+0200 INFO QlikServer1  b2aa55ec-a466-48c5-928d-0ae75e4b1923 Command=Stop repository;Result=0;ResultText=Success 0 0 0 INTERNAL System 0 Not available Repository Not available Not available Stop repository 0 Stopping Repository and calling shutdown events, due to: stopped by Windows service manager b2aa55ec-a466-48c5-928d-0ae75e4b1923

Environment:

Qlik Sense Enterprise on Windows 

 

Resolution

 

The qliksenserepository user (or the user specified in the repository connection string) does not have sufficient access to the tables in the repository database.

To fix this we need to connect to the database using a DB Admin tool like PGAdmin: Installing and Configuring PGAdmin 4 to access the PostgreSQL database used by Qlik Sense

and then run this SQL query:

DO
$$
DECLARE
    row record;
BEGIN
    FOR row IN SELECT tablename FROM pg_tables WHERE schemaname = 'public'
    LOOP
        EXECUTE 'ALTER TABLE public.' || quote_ident(row.tablename) || ' OWNER TO qliksenserepository;';
    END LOOP;
END;
$$;

 

 

Labels (1)
Contributors
Version history
Last update:
‎2021-06-23 10:08 AM
Updated by: