Search code examples
tfstfs-2015continuous-deployment

TFS agents offline after running run command and closing the cmd to bring them alive


I have 20 agents and a couple of them are offline after we run on out of space on the tfs. I cleaned the _work folder to have more space, and it allowed me to bring at least the 80% of the agents back without doing nothing just clicking on the Update option over the application pool

enter image description here

Unfortunately as you can see I have a couple of them offline. I went through the tfs server and launch the cmd with the run command for the agent15

enter image description here

The funny thing here is that the agent is online now, BUT if I close the cmd on the tfs server it goes offline again. Can any one help me how to bring the agent online having the cmd opened? A workaround is to reconfigure the agent and that's all, but I want to avoid that step, sure there is a better way than reconfiguring all my offline agents again.


Solution

  • When you do the manually update all agents, all build agents within the selected pool will go offline temporarily and then come back online as soon as they are updated.

    There are multiple reasons if a build agent is offline. The simplest and effectively way is reconfiguring the offline agent.

    In your case, you could also try to restart the Visual Studio Team Foundation Background Job Agent in services, and if you run your agent as a service, also restart the agent service VSTSAgent(machinename.xx). If it's not work, still recommend you to do the reconfigure option.