No agents meet this job's requirements
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Purpose
This page describes how to investigate why Bamboo may be showing a No agents meet this job's requirements message. It is an extension to Dedicating an agent and Configuring a job's requirements.
Issue
The message No agents meet this job's requirements in one of these sections of the Bamboo administrative interface:
- under Plan configuration >> [Stage] >> [Job] >> Tasks tab you should be in this URL
http://BAMBOO_BASE_URL/build/admin/edit/editBuildTasks.action?buildKey=PROJ-PLAN-JOB1
- under Plan configuration >> [Stage] >> [Job] >> Requirements tab you should be in this URL
http://BAMBOO_BASE_URL/build/admin/edit/defaultBuildRequirement.action?buildKey=PROJ-PLAN-JOB1
Dedicated agent(s)
If an Agent is dedicated, it needs to be Online for the job to be executed. If a Dedicated Agent is offline, the Job will report the "No agents meet this job's requirements" message.
Before we dig into capabilities and requirements, we first need to make sure no Bamboo agent is dedicated to the particular PROJECT, PLAN, JOB, DEPLOYMENT and/or ENVIRONMENT you are experiencing the issue with. In order to do that, please run the following SQL statement against Bamboo's database:
select AGENT_TYPE, TITLE, ENABLED, ASSIGNED.*
from AGENT_ASSIGNMENT as ASSIGNED
join queue as AGENT
on ASSIGNED.EXECUTOR_ID = AGENT.QUEUE_ID;
As a result, we have the following agent dedicated EXECUTOR_ID to EXECUTABLE_ID
AGENT_TYPE | TITLE | ENABLED | ASSIGNMENT_ID | EXECUTOR_ID | EXECUTOR_TYPE | EXECUTABLE_ID | EXECUTABLE_TYPE |
---|---|---|---|---|---|---|---|
REMOTE | Remote Agent A | true | 2621441 | 1179649 | AGENT | 360449 | PROJECT |
REMOTE | Remote Agent A | true | 2621442 | 1179649 | AGENT | 393217 | PLAN |
REMOTE | Remote Agent A | true | 2621443 | 1179649 | AGENT | 393218 | JOB |
REMOTE | Remote Agent A | true | 2621444 | 1179649 | AGENT | 819201 | DEPLOYMENT_PROJECT |
REMOTE | Remote Agent A | true | 2621445 | 1179649 | AGENT | 950273 | ENVIRONMENT |
The EXECUTOR_ID relates to the Bamboo server, Bamboo local agent, Bamboo remote agent, Bamboo elastic agent ID.
The EXECUTABLE_ID can be reviewed by running:
Confirmed Dedicated Agent is not the problem, what next?
In order to investigate the message No agents meet this job's requirements, we will need to review how the JOB in question is set up, especially which requirements have been configured for the job. You can get this information by running the following SQL statement:
select *
from BUILD as B
join BUILD_DEFINITION as BD
on B.build_id = BD.build_id
where B.full_key = 'PROJ-PLAN-JOB1'
and B.build_type = 'JOB'
The statement above will provide information on how tasks are set up and which capabilities they require as per the following:
BUILD_ID | BUILD_TYPE | CREATED_DATE | UPDATED_DATE | FULL_KEY | BUILD_KEY | ... | REQUIREMENT_SET | STAGE_ID | ... |
---|---|---|---|---|---|---|---|---|---|
360450 | JOB | 2015-12-21 11:59:31 | 2015-12-21 12:10:00 | PROJ-PLAN-JOB1 | JOB1 | ... | 491521 | 458753 | ... |
Now, it is time to get a list of all REQUIREMENT_SET to the PROJ-PLAN-JOB1 from above:
select *
from REQUIREMENT_SET as RS
join REQUIREMENT as R
on RS.REQUIREMENT_SET_ID = R.REQUIREMENT_SET
where R.REQUIREMENT_SET = 491521;
REQUIREMENT_SET_ID | REQUIREMENT_ID | KEY_IDENTIFIER | REGEX_MATCH | READONLY_REQ | MATCH_VALUE | PLUGIN_MODULE_KEY | UNIQUE_IDENTIFIER | REQUIREMENT_SET |
---|---|---|---|---|---|---|---|---|
491521 | 2588673 | CUSTOM_CAPABILITY | false | false | CAPABILITY_VALUE | (null) | -1 | 491521 |
491521 | 2588674 | system.builder.mvn3.Maven 3 | true | false | .* | (null) | -1 | 491521 |
Finally, check whether the Bamboo agent (Local, Remote, Elastic) you are attempting on running the build against has the capabilities required. Get the Agent ID from
select QUEUE_ID, AGENT_TYPE, TITLE, ENABLED, C.*
from QUEUE as AGENT
join CAPABILITY as C
on AGENT.CAPABILITY_SET = C.CAPABILITY_SET;
QUEUE_ID | AGENT_TYPE | TITLE | ENABLED | CAPABILITY_ID | KEY_IDENTIFIER | VALUE | CAPABILITY_SET |
---|---|---|---|---|---|---|---|
1179649 | REMOTE | Remote Agent A | true | 2523138 | CUSTOM_CAPABILITY | CAPABILITY_VALUE | 1212417 |
1179650 | REMOTE | Remote Agent B | true | 2523140 | system.builder.mvn3.Maven 3 | /opt/apache-maven-3.3.9 | 1212417 |
Based on the above, we can notice:
- Bamboo Remote Agent 1179649 does NOT have system.builder.mvn3.Maven 3 capability is required to run the build.
- Bamboo Remote Agent 1179650 does NOT have CUSTOM_CAPABILITY capability required to run the build.
Either add CUSTOM_CAPABILITY to Bamboo Remote Agent 1179649 or system.builder.mvn3.Maven 3 to Bamboo Remote Agent 1179650.
What next?
You might be encountering this issue : BAM-15965 - "No agents meet this job's requirements." after deleting dedicated agent