While using either of the following methods to test a process, we keep getting: Waiting for previous process to finish
This happens when using either of the following methods:
The underlying cause of this response is that the agent is being used by an Application's Server Type that is configured with the "Requires exclusive execution" option.
Release : 6.6
Component : CA RELEASE AUTOMATION REPOSITORY
There are several ways you can force the process utilizing the agent to complete/end. The methods include:
Only one of the above methods is needed. See below for more information related to the methods outlined above.
There are several steps to using this method.
First, you need to identify the job_id of processes running against the agent in question. This can be often be accomplished using the following query:
SELECT TOP (1000) job_id, server_state, server_type_name ,server_name, server_ip
WHERE server_state <> 'FINISHED' and server_state <> 'STOPPED' and server_name like '<servername>%'
Note: Replace <servername> in the where condition before running.
Second, once you have the job_id you can often find the Release Id and Release Name for that Job Id using the following query:
SELECT release_id, release_name
WHERE id = '<job_id>'
Note: Replace <job_id> in the where condition before running.
Finally, review the deployment by finding it by name from the Dashboard Running, Long Running, or Error State widgets. Or, by accessing the release using the following URL - replacing the releaseID at the end of the URL with the ReleaseID identified by the previous SQL Query: http://nolioservername:8080/datamanagement/#/main/deployments/<release_id_value_from_query>
One of the following ways may help locate and stop the process utilizing the agent in question.
Via the ROC, go to Environments -> Process Execution -> Expand the Environment -> Expand the Process Category -> Expand the Process -> Select the "Latest" tag.
If that process is running then it should look something like the screenshot below - where it shows you things like:
Alternatively, go to Environments -> Execution Overview to get a quick High Level overview of the processes running for that application. If you find a potential process, select it. It will bring you to the screen above where you can get more details. Once in a suspected process you will need to select the Details tab and expand the Server Type to see which agents the process is running on. This should give you the information needed to know whether this process should be stopped or not.
Another possible way to see what instances of this process are running/hanging is to use the Process Report from the Dashboard. From the Online Processes report you should be able to select the application column filter to narrow the scope of the report and/or the search option in the upper right corner of the report to search for your process name. Finding the process you're looking for and selecting it will bring you to the Process Execution area explained above where you can stop, pause, etc.
If you are interested in using the JMX then the following KB article describes the steps in its resolution section. JMX can be used to cancel a process, one by one using a specific job id using the removeProcessRuns MBean. It can also be used to end all jobs/processes using the removeAllActiveRuns MBean. The KB Article can be found here: Deployment Blocked by Another Deployment