Team City - Adding a new build agent on the build server

user1022521 picture user1022521 · Dec 2, 2011 · Viewed 7.4k times · Source

I am trying to add a new build agent on the build server (team city 6.5.5) - I was able to add a new agent but now the first one is disconnected and second one is running, I think there is some problem with the ownport & ServerURL that I have specified - So for my first one : name:abc ownPort=9090 serverUrl=http\://localhost\:xxxx

I tried giving another port other than xxxx, but it was not able to connect, only when i gave xxxx when adding the second agent it worked and thus replaced the old one..any help on how to changes these properties.

Answer

Utgarda picture Utgarda · Jan 26, 2012

Don't change the port number in serverUrl, it should remain the same for all agents. Specify different ownPort in buildAgent.properties for each agent installation to run multiple agents on the same host. Also, I don't think you need to escape ':' symbol, http://localhost:xxxx is ok.

Default value:

ownPort=9090

Try to clean all build agents info on server. To do that, first stop every agent with agent.sh stop or agent.bat stop if on Windows. Then, to be sure, hunt and kill possible remaining agents' java processes with your process management tool of choice. After that all agents should have state 'disconnected' on the server. Press 'Remove Agent' button for each one.

Then, with the help of Build Agent Conf page, re-install your agents one by one, and keep your eye on them appearing on the server :)