4
votes

I am using TeamCity 8.1.3 and have one task in the build queue and compatible enabled agent.

In "Build Queue" teamcity says that task "Can run on" - "2 agents" Both agents are idle.

I tried to reinstall teamcity, reinstall buildAgent and install agent on another machine. Tried to run agent as root. I read all agent logs and didn't find any errors; only warnings for not installed VCS tools (i need only git and its installed - no warning for it).

Why wont the agent run my task?

3

3 Answers

1
votes

If the VCS tools aren't installed then TeamCity can't pull down your code and run the agent.

From the TeamCity documentation http://confluence.jetbrains.com/display/TCD8/Git+(JetBrains):

Git support in TeamCity is implemented as a plugin. Git needs to be installed on the server machine and, if the agent-side checkout is used, on the agents.

and

[Build configuration] will run only on the agents where git was detected or specified in the agent properties.

So you need install git.

This page covers installation instructions for Windows, Linux and Mac: http://git-scm.com/book/en/Getting-Started-Installing-Git. This SO post discusses installation as well: Git for beginners: The definitive practical guide

0
votes

I can see two possible reasons

  1. One of the implicit requirements not fulfilled. You need to check the enqueued build info for this, it tells why exactly the build is in the queue with compatible agents but not running. Examples can be: limitation on simultaneous builds in build or template configuration, shared resources unavailable etc. This would be listed in the little popup next to the enqueued build label

  2. I've seen this happening when a requirement wasnt fulfilled initially (I had build configuration limited to 1 build at a time) when the build was enqueued, then it was corrected but the queue cached this requirement. Re-enqueuing the build sorted that.

0
votes

Hover by mouse cursor to your VCS engine (e.g. git) and maybe you'll see there this message:

Changes have not been collected yet

In that case check performance of your TC and vcs server. (this I just guess from the message)