BSA: Windows Patch Analysis Job error: Failed to create job workitems, Error: Missing expected job run for job id : xxxxx

Version 1
    Share:|

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    BladeLogic Server Automation Suite


    APPLIES TO:

    BMC BladeLogic Server Automation Suite



    PROBLEM:

     

    Windows Patching Job fails with the following error message:

      
    No job run found for job id: xxxxx Failed to create job workitems, Error: Missing expected job run for job id : xxxxx  com.bladelogic.mfw.util.BlException: Missing expected job run for job id : xxxxx      at com.bladelogic.model.job.jobrun.JobRunServiceImpl.findLastRunByJobId(JobRunServiceImpl.java:295)      at com.bladelogic.model.job.jobrun.JobRunServiceImpl.findLastRunByJobId(JobRunServiceImpl.java:261)      at com.bladelogic.model.job.compliance.patch.analysis.AsyncPatchAnalysisJobExecutor.startJobExecution(AsyncPatchAnalysisJobExecutor.java:902)      at com.bladelogic.app.service.job.JobExecutor.processEvent(JobExecutor.java:372)      at com.bladelogic.model.job.compliance.patch.analysis.AsyncPatchAnalysisJobExecutor.processEvent(AsyncPatchAnalysisJobExecutor.java:246)      at com.bladelogic.app.service.job.JobExecutor.processEvents(JobExecutor.java:214)      at com.bladelogic.app.service.job.execution.JobExecutionThread.execute(JobExecutionThread.java:115)      at com.bladelogic.app.service.job.execution.JobExecutionThread.execute(JobExecutionThread.java:24)      at com.bladelogic.app.service.thread.BlBlockingThread.run(BlBlockingThread.java:92)
       

     

     


    SOLUTION:

     

    Legacy ID:KA356114

      

    The error message relates to the last job run id of the Catalog that is used by the failing Patching Job.
    When the Patching Job is executed, it will first validate that the Catalog , and it does it by checking the last catalog job run. If the Catalog job run was deleted, then the Patching Job fails with the error message.

      

    To resolve the issue immediately, rerun the Catalog Update Job.

      

    One cause of the missing CUJ run is that the run(s) were most likely deleted by the cleanup job where the retention policy for the Catalog Job runs was low, forcing the latest runs to be deleted along with the old runs.  If you run Catalog Update Job once a month for example, then set the RESULTS_RETENTION_TIME in Catalog Update Job Properties to maybe 100 (~3 months). This ensures that the last job run will be present after cleanup, and the Patch Analysis Job will not fail in the same fashion. Basically the retention time should be higher than how many days pass between the cleanup runs.

     


    Article Number:

    000079824


    Article Type:

    Solutions to a Product Problem



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles