0
votes

I currently have one of my build agents in TeamCity running under a specific user due to one of the build steps. The build agent supports a couple different projects, so I want to add an additional build agent. I have successfully done so, but upon doing so the new build agent starts working, but my older build agent gets disconnected and states "Agent has unregistered." Now I am using the same user to try and run both build agents, so not sure if that is whats causing the issue or not. Both build agents are on the same machine and do have distinct names. I have tried to restart the agents in hope that it would fix itself, but have not been successful.

1

1 Answers

3
votes

There are several resources covering setup of multiple build agents on the same machine, you can examine them if you wish.

Here are requirements from official documentation:

  • The agents are installed in separate directories.
  • The agents have the distinctive workDir and tempDir directories in the buildAgent.properties file.
  • Values for the name and ownPort properties of buildAgent.properties are unique.
  • No builds running on the agents have the absolute checkout directory specified.

Please, make sure that port number is changed, as this is most obvious reason why build agent could be terminated. Also, check that each build agent has its own unique name. Otherwise, please check each build agent logs and - if it won't be clear -, share error here.