0
votes

So I'm currently trying to play around with Team Foundation Server 2015 on premise. I got source control down and already setup my project collections and team project.

My next adventure is to try out continuous integration starting with Automated builds. I am however stuck in Build definition.

I already have an online build agent with the following specs: Windows 7 Visual Studio 2013

Now when I que a build it fails after the following message

Waiting for console output from an agent...

I tried to download the log files but it gave me a blank folder. Do not know what next steps I should check and would really appreciate any help in this area.

Thanks

2

2 Answers

0
votes

Generally this issue is caused by the agent failing to access resources for the build process.

Please first check if the agent is enabled in your Agent Pool, then try below things:

  • Check the connectivity

    • Check URL configuration of TFS as Danko mentioned above, make sure you deployed the build agent with the correct URL.

    • Try disable the Firewall on machine to check if the communicate issue caused the build hang.

    • If you are set the specific port or use proxy server for your TFS, then try to set the exception for the port on your firware. See this similar issue.

  • Make sure the account that the agent is run under is in the “Agent Pool Service Account” role.

  • Make sure you deploy the Windows build agent by exactly following this article.

  • Restart below services .

    • Visual Studio Team Foundation Background Job Agent
    • Your build agent service
  • Deploy a new build agent to check if that works.

Reference this similar thread for details:

2 Solutions collect form web for “vNext build on TFS 2015 hangs on MSBuild step and produces no log files”

Run Get-NetFirewallPortFilter in PowerShell (run PowerShell as Administrator) on the TFS machine to get the port exception list.

Run the following PowerShell script to set exception for the specific port:

   $port = New-Object -ComObject HNetCfg.FWOpenPort
   $port.Port = 9191
   $port.Name = 'TFS CI Port:9191'
   $port.Enabled = $true

   $fwMgr = New-Object -ComObject HNetCfg.FwMgr
   $profile = $fwMgr.LocalPolicy.CurrentProfile
   $profile.GloballyOpenPorts.Add($port)
0
votes

After installing the agent, it would have to appear Green, Enabled and in an IDLE state - in your WebAccess (Settings, either Build or Agent Queues directly, and verify the state there). I have experienced only once similar behavior, with accessing the resources and it was connected with how the TFS Server "Web Access URL" was set in the TFS Administration Console.You should make sure, that you are able to access your TFS from the build machine, using the exact same URL, that you have provided to your new build agent as well.