TeamCity Default Agent Re-Authorizing

Answered

We are currently licensed for 10 build agents on our TeamCity 2019 server and I have noticed that over the past 2 months, the default agent, which has been disabled and unauthorized, will randomly get reauthorized and appear on the agent screen. I have checked the audit log and the only action taken on the agent is when I have unauthorized it. I was wondering if there was any reason this might be happening, and if it is going to have any negative affect on our server since we only have a license for 10 agents and when this one authorizes itself, it puts us at 11 agents total.

1
1 comment

Hi Christopher,

Apologies for the delay.

I assume that you are talking about the agent that is located in the TeamCity installation directory in the buildAgent folder. The agent can start if you launch your TeamCity server with runAll.[sh|bat]. This script starts both the server and the default agent. In order to start only the server without the agent, you should use teamcity-server.[sh|bat].

Additionally, you can edit the buildAgent.properties in the agent's conf directory and remove the authorization token (and probably change the name to a more descriptive). This will ensure that even if someone accidentally started the default agent, it will connect to the server, but will not authorize. You can also completely remove or change the server URL in the configuration file so that the agent would not even connect to the server. But this may leave the agent running on your system without you noticing it. It will run in the background and continue its attempts to connect to a non-existing server.

0

Please sign in to leave a comment.