No agents meet this job's requirements
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs 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
Summary
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.
Solution
Issue
The message No agents meet this job's requirementsin 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:
1
2
3
4
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_IDrelates to the Bamboo server, Bamboo local agent, Bamboo remote agent, Bamboo elastic agent ID.
The EXECUTABLE_IDcan be reviewed by running:
How do I get PROJECT?
1
2
3
select PROJECT_KEY, TITLE
from PROJECT
where PROJECT_ID = 360449;
Sample response:
PROJECT_KEY | TITLE |
---|---|
PROJ | Project |
How do I get PLAN?
1
2
3
4
5
select PROJECT_KEY, PROJECT.TITLE,
BUILD_TYPE, FULL_KEY, BUILDKEY, BUILD.TITLE
from BUILD
join PROJECT on BUILD.PROJECT_ID = PROJECT.PROJECT_ID
where BUILD_ID = 393217;
Sample response:
PROJECT_KEY | TITLE | BUILD_TYPE | FULL_KEY | BUILDKEY | TITLE |
---|---|---|---|---|---|
PROJ | Project | CHAIN | PROJ-PLAN | PLAN | Plan |
How do I get JOB?
1
2
3
4
5
select PROJECT_KEY, PROJECT.TITLE,
BUILD_TYPE, FULL_KEY, BUILDKEY, BUILD.TITLE
from BUILD
join PROJECT on BUILD.PROJECT_ID = PROJECT.PROJECT_ID
where BUILD_ID = 393218;
Sample response:
PROJECT_KEY | TITLE | BUILD_TYPE | FULL_KEY | BUILDKEY | TITLE |
---|---|---|---|---|---|
PROJ | Project | JOB | PROJ-PLAN-JOB1 | JOB1 | Default Job |
How do I get DEPLOYMENT_PROJECT?
1
2
3
select NAME
from DEPLOYMENT_PROJECT
where BUILD_ID = 819201;
Sample response:
NAME |
---|
Deployment |
How do I get ENVIRONMENT?
1
2
3
4
5
select ENV.NAME
from DEPLOYMENT_ENVIRONMENT as ENV
join DEPLOYMENT_PROJECT as DEP
on ENV.PACKAGE_DEFINITION_ID = DEP.DEPLOYMENT_PROJECT_ID
where ENV.ENVIRONMENT_ID = 950273;
Sample response:
NAME |
---|
Environment |
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:
Get build definition
1
2
3
4
5
6
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:
Get requirements
1
2
3
4
5
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
1
2
3
4
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 havesystem.builder.mvn3.Maven 3 capability is required to run the build.
Bamboo Remote Agent 1179650 does NOT haveCUSTOM_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
Was this helpful?