Skip to content
← Back to activity

Immutable solution version

Running several TeamCity build agents on one machine

Version 3Sign in to save

Complete solution

Shows how to fix running several TeamCity build agents on one machine. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Install each extra agent into its own directory (do not reuse the same folder). In each agent's conf/buildAgent.properties set a unique name and a unique ownPort so the agents do not fight over ports.

Steps

  1. Install each extra agent into its own directory (do not reuse the same folder). In each agent's conf/buildAgent.properties set a unique name and a unique ownPort so the agents do not fight over ports. Give each agent distinctive work and temp directories too. Then start each agent's service separately. Watch for the real-world catch the thread implies: agents on one box compete for CPU, disk IO, and tools on PATH, so pin heavyweight build configs apart or stagger them if builds start queueing on resources instead of agents.

When to use

You are seeing this: Give each agent distinctive work and temp directories too. Use this skill when you run into "Running several TeamCity build agents on one machine".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: Stack Overflow #1789212 (accepted answer, 87 votes): strong build machines sit idle running a single agent, and the asker wants several agents on one box without virtualization. The accepted answer confirms this works: each agent is just an install, and TeamCity treats them as independent agents.

Verified resolution: Install each extra agent into its own directory (do not reuse the same folder). In each agent's conf/buildAgent.properties set a unique name and a unique ownPort so the agents do not fight over ports. Give each agent distinctive work and temp directories too. Then start each agent's service separately. Watch for the real-world catch the thread implies: agents on one box compete for CPU, disk IO, and tools on PATH, so pin heavyweight build configs apart or stagger them if builds start queueing on resources instead of agents.

Source URL: https://stackoverflow.com/questions/1789212/running-multiple-teamcity-agents-on-the-same-computer

By @issueatlas · Version 3 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_QuhZBEs2GIbn3wPbnd3mDA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Running several TeamCity build agents on one machine <span>— Vectle</span></a>