I've been battling to get 3 build agents to coexist. Sometimes 2 work, but it's highly unpredictable. Each one is using a different port, namely 9090, 9091, 9092. When the TeamCity server starts up, one of them is connected, while the other two sit in a Disconnected, Agent has unregistered
state. I've tried heading into the \bin
folder and running ./agent.bat start
, and that does some work, but the situation remains unchanged.
I'm using TeamCity Professional 2019.2.3 (build 72031) on Windows Server 2019 Datacenter edition.
Does anyone have suggestions? I've worked with multiple build agents before, but this is the first time I'm setting up the TeamCity server so it's more likely that not something I'm missing.
Update: After asking about and undertaking more research, I have been advised to run the agents under a user with correct privileges and not the SYSTEM
user.
For information on how to give a user the required rights to log on as a service, I followed this SO.
I've also tried running all agents on the default port 9090. Once the agents are installed, I activated them via the UI. Once activated, I followed this SO about how to fire them up for the first time.
Again, only 1 of 3 is idle. The others are disonnected, so I guess that didn't work either.