new installed agents issue

Answered

I upgraded my TeamCity to a new server. after upgrading, i installed two new agents.

 

After the installation, everything worked fine. but every time i restart my server, the new agents are always disconnected (even when i run ./agent start) - while the default agent is working.

Also - the default agent's "authorizationToken" remains constant, while every restart causes the other agents "authorizationToken" to be something different.

 

The only action that seems to solve this, is going to the TeamCity  UI, click "remove agent", then from the shell, editing the build.properties files for the new agents, and set their "authorizationToken" to be like the default agent one. But then again, if i restart my machine again, nothing works, except the default agent.

 

Am i missing something?

3 comments
Comment actions Permalink

Hi,

The authorizationToken shouldn't need to be reset after a restart. Each authorizationToken is unique to each agent. Can you tell me if you're leaving the authorizationToken empty when you start the additional agents for the first time? The TeamCity server will automatically generate this token and write it back to the buildAgent.properties file after the initial connection.

Can you please tell me what version did you upgrade from and to? In which OS are your agents running, is it the same as the TeamCity server?

Thanks,

Eric

0
Comment actions Permalink

for the first time, i didnt leave it empty, i used the token of the default agent (and it worked). when i restart, it re-writes a new token, and the agents appear disconnected.

 

upgraded from  10.0.4 (build 42538) to 2020.1.1 (build 78657).

 

Linux, and yes, the same as the teamcity server. i just downloaded the buildAgent.zip files and installed them under TeamCity folder. 

0
Comment actions Permalink

If you leave the value for authorizationToken field empty, a unique token should automatically be generated and written to the buildAgent.properties file. You can then authorize the agent through the Web UI and this token should not change on a restart and the agent should not need to be reauthorized every time.

######################################
# Optional Agent Properties #
######################################

## A token which is used to identify this agent on the TeamCity server for agent authorization purposes.
## It is automatically generated and saved back on the first agent connection to the server.
authorizationToken=

Please try configuring it in this way and let me know if the token continues to change on each restart.

1

Please sign in to leave a comment.