Often time when we are running a process we get a message like the job is blocked waiting for previous process to finish. The problem accelerate when the system is used by many users and have lot of agents making it difficult to find which job is blocking.
The above problem is due to the fact that each agent participating or running a process can either run it exclusively (i.e. one after another in queue manner) or non-exclusively (running jobs in parallel). During the design of process in RA, the designer creates various server types in application and assign these agents under those server types, where each server type properties control exclusiveness mentioned prior.
Release Automation: 6.0,6.1,6.2,6.3,6.4
To address above issue we first need to identify which jobs are blocking other jobs. There are various way to overcome this situation listed below.
- If you have very few application and not large agents sets.
- Steps to unblock jobs one by one using ROC UI
- Login to ROC and navigate to Environments-> Execution overview
- Filter the process run, make sure to uncheck all project option making it as "None". An example process list will be shown
- Navigate to the process which is "In Queue", identify server participating in that run and stop/remove running process which are halted or running on those agents for long time.
- Removing jobs via JMX: Please refer to document https://comm.support.ca.com/kb/eliminate-a-process-that-is-not-responding-in-ca-release-automation/kb000035856
- If you have many application and large number of agents participating across various server types
- This case is complex where you have many agents participating in various server types in various application and hard to track them manually one by one. Please find below process to narrow down jobs identification and removal as per below process.
- Login to JMX console of NAC, ideally it will be at http://<NAC-HOST>:<JMX-PORT> for example http://localhost:20203
- Invoke listBlockedJobs at http://<NAC-HOST>:<JMX-PORT>/invoke?operation=listBlockedJobs&objectname=noliocenter%3Atype%3Dinfo which will give us the list of job id's of all processes which are blocked.
- Now we need to invoke listActiveRuns at http://<NAC-HOST>:<JMX-PORT>/invoke?operation=listActiveRuns&objectname=noliocenter%3Atype%3Dinfo the name of all the jobs which are active running and need to get the job name of job id listed above.
- Once we have job name and jobs id, which are been blocked we will now get the list of agents on which these jobs are getting blocked. Invoke method listAgentQueues at http://<NAC-HOST>:<JMX-PORT>/invoke?operation=listAgentQueues&objectname=noliocenter%3Atype%3Dinfo it will give us list of all agents queue.
- Now once we have agent queue, we know which process on which particular agent is blocked by which running process. For example from above screen shot I can see that I have two agents in my system i.e. agent  and agent  and there is no running process on agent  but 3 processes on agent  out of which 2 process are in queue waiting for running process with job-id 70 to finish. Now knowing the job name I can just go ahead and remove those processes either via JMX or via ROC UI.