Creating a new scheduled job is outputting an Error message: "Error occurred while accessing the database"
search cancel

Creating a new scheduled job is outputting an Error message: "Error occurred while accessing the database"

book

Article ID: 116632

calendar_today

Updated On:

Products

CA Privileged Access Manager - Cloakware Password Authority (PA) CA Privileged Access Manager (PAM)

Issue/Introduction

While trying to create a new scheduled job the page is outputting an Error message:
"Error occurred while accessing the database"
Also while opening the Scheduled Jobs page it is titled with a red error:
"An error occurred"

This happened e.g. after a not graceful restart of the PAM appliance

Environment

Release: 3.x
Component: CAPAMX

Cause

It seems obvious that some or all of the cspm DB's QRTZ tables holding information about these scheduled jobs went corrupt.

Resolution

Clearing all the QRTZ tables in an SSH allowed to setup the scheduled jobs afresh.

To do so SSH into the affected PAM appliance:

- connect to the cspm db
mysql cspm

- clear all the QRTZ tables running these commands:
delete from QRTZ_BLOB_TRIGGERS;
delete from QRTZ_CALENDARS;
delete from QRTZ_CRON_TRIGGERS;
delete from QRTZ_FIRED_TRIGGERS;
delete from QRTZ_JOB_DETAILS;
delete from QRTZ_JOB_LISTENERS;
delete from QRTZ_PAUSED_TRIGGER_GRPS;
delete from QRTZ_SCHEDULER_STATE;
delete from QRTZ_SIMPLE_TRIGGERS;
delete from QRTZ_TRIGGERS;
delete from QRTZ_TRIGGER_LISTENERS;
  (it might be necessary to rerun this batch of commands several times to resolve all of the constraints in the tables)
 

Additional Information

Make sure to take a DB backup of the node first so that you can revert in case needed.

Note:
Table modifications are not replicated in the cluster
Hence make sure the above is being performed in the first node of the primary site - then restart the cluster to have the changes replicated to all the other nodes.

Once the cluster is restarted recreate the Scheduled jobs afresh on any of the cluster nodes in the GUI which will propagate the new jobs to all the other nodes.