0

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.

JP Damstra
  • 545
  • 7
  • 25
  • Why are you running them on different ports? Are you installing all of the agents on the same machine? – infojolt May 04 '20 at 16:16
  • @infojolt yes they are on the same machine. Initially I had all three on 9090 (default), but that led to the same issue. In my research I happened upon an article that mentioned to install each on a separate port so the last thing I tried was that. – JP Damstra May 04 '20 at 16:27

1 Answers1

0

I couldn't figure out why the other two build agents always start in a disconnected state when the build machine starts up, however I've created a couple scheduled tasks that fire them up when the build machine starts up which ultimately solves the problem.

JP Damstra
  • 545
  • 7
  • 25