So you have started to look into the new build system for TFS 2015 and have encountered some issues. In this post I’ll show you how I troubleshooted and fixed an offline TFS build 2015 agent. If the following screenshot looks familiar then keep reading. It comes down to permissions. Below are the steps that you can follow to confirm and correct the problem.
1) Log onto the build machine where the remote agent is installed and verify the account used by the service is correct. Normally I would suggest that a dedicated account for TFS build be used here. If the agent is offline then the service will not be running. No point in starting it until we fix the issue so let’s keep digging.
2) Now visit the installation directory where the Agent was unzipped and installed. Open the ‘_diag’ folder to access the logs. Open the most recent log and scan through it. You will more than likely find an error like: ‘[Service Account] needs Listen permissions for pool [Name] to perform the action’ repeated through the log.
3) Ok. Now we have identified the issue. We are missing a permission in the build configuration. Go back to the ‘Agent Pools’ page and expand your Pool to view the security groups. If you open the ‘Agent Pool Service Accounts’ you will more than likely see an empty group. Add your service account in there.
4) Now switch back to your build server and start the “VSO…” service.
5) Finally refresh the Pools page and the agent should now be green and you can try your first TFS 2015 build. You should be good to go!