No agent found in pool which satisfies the specified demands

Sonarqube developer (unlicensed)
Sonarqube extension 4.17.0
VS TFS 2018 Version 16.131.27701.1 (on-premises)
Agent version 2.131.0
OpenJDK 11.02

I think I have everything set up, but build fails. Build agent apparently not in the right condition.

Our setup uses vsbuild and I get following:
No agent found in pool which satisfies the specified demands:
Agent.Version -gtVersion 2.119.1

Tried msbuild as well getting this:
No agent found in pool which satisfies the specified demands:
Agent.Version -gtVersion 2.119.1

Any directions either solution or something I should read?

If you are using self-hosted agents then this thread might help.

Nice to know it was somebody elses fault :wink:

The read does not seem to tell me how to manually add a “Java” demand?

The Microsoft docs would be the best place to look.

The terminology used in the MS docs is that build jobs make “Demands” and build agents provide “Capabilities” (an agent will be able to run a job if its Capabilities match the Demands of the job).
So in the docs you’ll want to look at how to add a Capability to an agent.

The docs describe how to add a Capability through the Azure DevOps UI. It used to be the case that an environment variable on the build agent was also treated as a Capability, but I don’t know if that is still the case.

Aah I see, they should not write about adding demands when adding capabilities is the smart way to go. I found it, looks a bit different in TFS 2018, but to my surprise it already had these in system capability on my agents:

java C:\Program Files\Java\jdk-11.0.2
JAVA_HOME C:\Program Files\Java\jdk-11.0.2

I still decided to add the same; java C:\Program Files\Java\jdk-11.0.2 as a user capability and it worked.


1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.