Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Mar 20, 2024 10:59:28 AM
Jun 30, 2017 8:04:04 PM
In Qlik Sense, there could be a situation where the server is installed and functioning, all the services are running except the fact that all the scheduler tasks are failing.
The scheduler service may fail after restarting. This indicates that the issue is related to the scheduler ExecutionSessions table data in the Repository PostGres SQL database.
In the Qlik Sense Management Console, task statuses may be listed as Reset.
This issue happens when users add, remove, delete too many tasks while frequently stopping and starting the scheduler service.
The data in the scheduler tasks execution sessions table gets corrupted. The startup sequence will start to fail and cause errors in the scheduler logs.
Corruption may occur due to:
This can look like this in the repository database:
The following will be printed to the scheduler logs:
System.Scheduler.Scheduler.Core.Utility.SystemInformationProvider
An item with the same key has already been added.
and/or
System.Scheduler.Scheduler.Main
Startup sequence failed, shutting down to avoid any inconsistent state, please restart the scheduler
and/or
Unexpected exception in Delete for Entity ExecutionSession with Id <Task ID>
To resolve this issue, it is recommended to wipe the data from the Execution sessions table.
Please note that this will need to be a hard deletion from the table and not soft deletion.
If you are running Qlik Data Gateway, proceed with the following before wiping any data:
Otherwise, proceed as follows:
SELECT
"ExecutionSessions"."ID",
"ExecutionSessions"."AbortAt",
"ExecutionSessions"."Retries",
"ExecutionSessions"."AbortReason",
"ExecutionSessions"."User",
"ExecutionSessions"."Deleted",
"ExecutionSessions"."CreatedDate",
"ExecutionSessions"."ModifiedDate",
"ExecutionSessions"."SyncDate",
"ExecutionSessions"."ModifiedByUserName",
"ExecutionSessions"."App_ID",
"ExecutionSessions"."ExecutingNode_ID",
"ExecutionSessions"."ExecutionResult_ID",
"ExecutionSessions"."ReloadTask_ID",
"ExecutionSessions"."UserSyncTask_ID",
"ExecutionSessions"."ExternalProgramTask_ID"
FROM
public."ExecutionSessions";
DELETE
FROM
public."ExecutionSessions";
RESOLUTION:
1. Stop "Qlik Data Gateway - Direct Access"
2. Start Qlik Sense Scheduler Service
3. Start "Qlik Data Gateway - Direct Access"
I was able to replicate this issue on Qlik Sense Feb 2024. "Qlik Data Gateway - Direct Access" was mounting on 5050/5151.
If QDG starts before the scheduler, the scheduler will drop after a few seconds and keep starting/stopping.
Please consider adding this information to the article. None of the changes in the ExecutionSessions table data had an effect in my scenario.
Regards,
Thank you Eduardo!