Smarts NCM: Receive 'Failed to find all jobs' error when launching the Schedule Manager
search cancel

Smarts NCM: Receive 'Failed to find all jobs' error when launching the Schedule Manager

book

Article ID: 303506

calendar_today

Updated On:

Products

VMware

Issue/Introduction

Symptoms:




Receive 'Failed to find all jobs' error in Smarts Network Configuration Manager (Smarts NCM) after launching the Schedule Manager and default job filter is applied
Receive error in Smarts NCM when default Schedule Manager job filter is applied stating it failed to find all jobs

Environment

VMware Smart Assurance - NCM

Cause

The above issue can be caused if there is a null value in the following Smarts NCM voyence database location:

Database table: cm_job
Database column: maintenance_window_type

Resolution

If you encounter this issue, do the following:
  1. 1. Login to the Smarts NCM database (voyence) from the command line:

    su - pgdba
    psql voyencedb voyence


     
  2. Run the following PostgreSQL query to identify which records are causing the null pointer exception:

    SELECT job_number, job_name, job_id, maintenance_window_type from cm_job WHERE maintenance_window_type IS NULL;

     
  3. Review each record returned by the preceeding query and determine which value to populate in the maintenance_window_type field from the following list of valid values. The job_name field will typically contain a descriptive reference that will indicate which value to use:

    'maintenancewin.push'
    'maintenancewin.pull'
    'maintenancewin.autodisc'
    'maintenancewin.updateos'
    'maintenancewin.quickcmd'
    'maintenancewin.savedcmd'
    'maintenancewin.cutthro'
    'maintenancewin.report'


     
  4. For each record identified in the PostgreSQL query you ran in the preceding step, run the following query to update the maintenance_window_type field with the value you determined for that record:

    UPDATE cm_job SET maintenance_window_type='maintenancewin.<correct_type>' WHERE job_number = <JOB_NUMBER> AND maintenance_window_type IS NULL;

    Example
     If the job in the job record is a push job, you would use the 'maintenancewin.push' value for the maintenance_window_type field above, with a job_number value of 1036338 replacing the <JOB_NUMBER> placeholder shown above.

     
  5. Once you have updated all the invalid records in the cm_jobs table, verify the changes using the same PostgreSQL SELECT query in the preceding step (as follows (the query should return 0 records):

    SELECT job_number, job_id, maintenance_window_type FROM cm_job WHERE maintenance_window_type IS NULL;

    job_number  | job_id | maintenance_window_type
    ------------+--------+-------------------------
    (0 rows)


     
  6. You should now be able to log in to Smarts NCM and launch Schedule Manager with no error being received. Note that depending on the number of jobs that were updated, it may take a bit of time before the Smarts NCM console is totally refreshed from the database and the error goes away.