2

I have configured new build server for TFS 2015, My Xaml build runs just fine, but the vNext build always stuck with status "Waiting for an available agent."

-Agent pool is Green -There is only one build agent configured -I have removed and configured the agent multiple times with no luck

update 1 :
**I got this from the agent log

05:20:24.283781 Sending trace output to log files: D:\Agent\_diag
05:20:24.315032 VsoAgent.exe was run with the following command line:
"D:\Agent\Agent\VsoAgent.exe"  
05:20:24.408735 SettingsFileHelper.Load - settings[AutoUpdate]=True
05:20:24.408735 SettingsFileHelper.Load - settings[RootFolder]=D:\Agent
05:20:24.408735 SettingsFileHelper.Load - settings[WorkFolder]=D:\Agent\_work
05:20:24.408735 SettingsFileHelper.Load - settings[ServerUrl]=http://MyTeamServer:8080/tfs/
05:20:24.408735 SettingsFileHelper.Load - settings[AgentName]=Agent1
05:20:24.408735 SettingsFileHelper.Load - settings[PoolId]=1
05:20:24.408735 SettingsFileHelper.Load - settings[PoolName]=default
05:20:24.408735 SettingsFileHelper.Load - settings[AgentId]=8
05:20:24.408735 SettingsFileHelper.Load - settings[RunAsWindowsService]=False
05:20:24.440027 BaseLogger.LogStatus(scope.JobId = 00000000-0000-0000-0000-000000000000, scope.TimelineRecordId = 00000000-0000-0000-0000-000000000000, record.Name = Agent)
05:20:24.455651 BaseLogger.LogConsoleMessage(scope.JobId = 00000000-0000-0000-0000-000000000000, message = Authenticating to the server http://MyTeamServer:8080/tfs/)
05:20:24.471281 Exe location hash = 74c7e125df21f66fe28c26f67ea7c650
05:20:24.486906 Exe location hash = a160547c56394a3ac9e4de999af25fb8
05:20:24.486906 Exe location hash = 4eca74ed3b08ff5e4d7e5d3bed6602da
05:20:25.486881 SelfUpdater_Update(sharePath=, connection=True, runningAsService=False, workingFolder=D:\Agent\_work)
05:20:25.486881 Using ServerDownloader(http://MyTeamServer:8080/tfs/)
05:20:25.486881 SelfUpdater.Update()
05:20:25.486881 ServerDownloader.UpdateNeeded()
05:20:25.486881 ServerDownloader.UpdateNeeded() - Getting agent version
05:20:25.705691 ServerDownloader.UpdateNeeded() - server agent version = 1.95.0
05:20:25.705691 ServerDownloader.UpdateNeeded() - agent version = 1.95.0
05:20:25.705691 Leaving ServerDownloader.UpdateNeeded - result = False
05:20:25.705691 Leaving SelfUpdater.Update()
05:20:25.705691 Leaving SelfUpdater_Update
05:20:25.721260 BaseLogger.LogConsoleMessage(scope.JobId = 00000000-0000-0000-0000-000000000000, message = Registering the agent 'Agent1 (default)' with the server http://MyTeamServer:8080/tfs/)
05:20:25.736885 BaseLogger.LogConsoleMessage(scope.JobId = 00000000-0000-0000-0000-000000000000, message = Using SessionOwnerName 'DOHQDGEM21')
05:20:25.736885 Getting capabilities on this agent
05:20:25.736885 Exe location hash = 74c7e125df21f66fe28c26f67ea7c650
05:20:25.736885 CentralLogger(name = Agent8-74c7e125df21f66fe28c26f67ea7c650)
05:20:25.752511 CentralLogger() - pipename = net.pipe://localhost/Agent8-74c7e125df21f66fe28c26f67ea7c650
05:20:25.768136 Unable to find the SCVMM admin console install path from registry
05:20:25.783762 CentralLogger.Listen() - opening host
05:20:25.815010 CentralLogger.Listen() - waiting for shutdown
05:20:25.846263 Unable to find SQLPackage.exe from SQL Server path for version : 110.
05:20:25.846263 Unable to find SQL Install Root Path for version : 110.
05:20:25.846263 Unable to find the location of Dac Framework (SqlPackage.exe) from registry for SQL Server
05:20:25.846263 Visual Studio not found on machine
05:20:25.846263 Unable to find the location of Dac Framework (SqlPackage.exe) from registry
05:20:25.861888 DotNetFramework_4.5.3=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v4\Client\Release) (C:\Windows\Microsoft.NET\Framework\v4.0.30319\)
05:20:25.861888 DotNetFramework_4.5.3_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v4\Client\Release) (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\)
05:20:25.861888 DotNetFramework=latestdotnet() (C:\Windows\Microsoft.NET\Framework64\v4.0.30319)
05:20:25.861888 PROCESSOR_REVISION=$env:PROCESSOR_REVISION (2c02)
05:20:25.861888 UATDATA=$env:UATDATA (C:\Windows\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77)
05:20:25.861888 PSModulePath=$env:PSModulePath (C:\Windows\system32\WindowsPowerShell\v1.0\Modules\)
05:20:25.861888 PROCESSOR_ARCHITECTURE=$env:PROCESSOR_ARCHITECTURE (AMD64)
05:20:25.861888 Path=$env:Path (C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\HP\HP BTO Software\lib;C:\Program Files\HP\HP BTO Software\bin;C:\Program Files\HP\HP BTO Software\bin\win64;C:\Program Files\HP\HP BTO Software\bin\win64\OpC;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\)
05:20:25.861888 VS120COMNTOOLS=$env:VS120COMNTOOLS (C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\)
05:20:25.861888 OvInstallDir=$env:OvInstallDir (C:\Program Files\HP\HP BTO Software\)
05:20:25.861888 PROCESSOR_LEVEL=$env:PROCESSOR_LEVEL (6)
05:20:25.861888 PATHEXT=$env:PATHEXT (.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC)
05:20:25.861888 OVPERLLIB=$env:OVPERLLIB (C:\Program Files\HP\HP BTO Software\nonOV\Perl\a\lib)
05:20:25.861888 OvAgentDir=$env:OvAgentDir (C:\ProgramData\HP\HP BTO Software\)
05:20:25.861888 FP_NO_HOST_CHECK=$env:FP_NO_HOST_CHECK (NO)
05:20:25.861888 USERNAME=$env:USERNAME (SYSTEM)
05:20:25.861888 OS=$env:OS (Windows_NT)
05:20:25.861888 PROCESSOR_IDENTIFIER=$env:PROCESSOR_IDENTIFIER (Intel64 Family 6 Model 44 Stepping 2, GenuineIntel)
05:20:25.861888 ComSpec=$env:ComSpec (C:\Windows\system32\cmd.exe)
05:20:25.861888 OvDataDir=$env:OvDataDir (C:\ProgramData\HP\HP BTO Software\)
05:20:25.861888 TEMP=$env:TEMP (C:\Windows\TEMP)
05:20:25.861888 NUMBER_OF_PROCESSORS=$env:NUMBER_OF_PROCESSORS (4)
05:20:25.861888 TMP=$env:TMP (C:\Windows\TEMP)
05:20:25.861888 windir=$env:windir (C:\Windows)
05:20:25.861888 TMP=$env:TMP (C:\Users\69568\AppData\Local\Temp)
05:20:25.861888 TEMP=$env:TEMP (C:\Users\69568\AppData\Local\Temp)
05:20:25.861888 WindowsKit_8.1=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots\KitsRoot81) (C:\Program Files (x86)\Windows Kits\8.1)
05:20:25.861888 WindowsKit=maxWindowsKit() (C:\Program Files (x86)\Windows Kits\8.1)
05:20:25.877656 WindowsSdk_7.1=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v7.1A\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\)
05:20:25.877656 WindowsSdk_8.0=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.0A\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\)
05:20:25.877656 WindowsSdk_8.0_NetFx35Tools_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx35Tools-x64\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\x64\)
05:20:25.877656 WindowsSdk_8.0_NetFx35Tools=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx35Tools-x86\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\)
05:20:25.877656 WindowsSdk_8.0_NetFx40Tools_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools-x64\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\x64\)
05:20:25.877656 WindowsSdk_8.0_NetFx40Tools=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools-x86\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\)
05:20:25.877656 WindowsSdk_8.1=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.1A\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\)
05:20:25.877656 WindowsSdk_8.1_NetFx40Tools_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.1A\WinSDK-NetFx40Tools-x64\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\)
05:20:25.877656 WindowsSdk_8.1_NetFx40Tools=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.1A\WinSDK-NetFx40Tools-x86\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\)
05:20:25.877656 MSBuild_4.0=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\MSBuild\ToolsVersions\4.0\MSBuildToolsPath) (C:\Windows\Microsoft.NET\Framework\v4.0.30319)
05:20:25.877656 MSBuild_12.0=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\MSBuild\ToolsVersions\12.0\MSBuildToolsPath) (C:\Program Files (x86)\MSBuild\12.0\bin)
05:20:25.877656 MSBuild=latestMSBuildVersion() (C:\Program Files (x86)\MSBuild\12.0\bin)
05:20:25.877656 MSBuild_4.0_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\MSBuild\ToolsVersions\4.0\MSBuildToolsPath) (C:\Windows\Microsoft.NET\Framework64\v4.0.30319)
05:20:25.877656 MSBuild_12.0_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\MSBuild\ToolsVersions\12.0\MSBuildToolsPath) (C:\Program Files (x86)\MSBuild\12.0\bin\amd64)
05:20:25.877656 MSBuild_x64=latestMSBuildVersion(64) (C:\Program Files (x86)\MSBuild\12.0\bin\amd64)
05:20:25.877656 VisualStudio_12.0=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\12.0\ShellFolder) (C:\Program Files (x86)\Microsoft Visual Studio 12.0)
05:20:25.877656 VisualStudio_IDE_12.0=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\12.0\InstallDir) (C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE)
05:20:25.877656 VSTest_12.0=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow
05:20:25.877656 VisualStudio=latestVsVersion() (C:\Program Files (x86)\Microsoft Visual Studio 12.0)
05:20:25.877656 VisualStudio_IDE=latestVsVersionIde() (C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE)
05:20:25.877656 VSTest=latestVsTestVersion() (C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow)
05:20:25.893171 BaseLogger.RegisterWriter(name=serverWriter, writer, verbosity=Info
05:20:25.893171 BaseLogger.RegisterWriter: writer type Microsoft.TeamFoundation.DistributedTask.Agent.Logger.ServerWriter
05:20:25.893171 BaseLogger.RegisterWriter(name=consoleWriter, writer, verbosity=Status
05:20:25.893171 BaseLogger.RegisterWriter: writer type Microsoft.TeamFoundation.DistributedTask.Agent.Logger.ConsoleWriter
05:20:25.893171 BaseLogger.RegisterWriter(name=fileWriter, writer, verbosity=Diagnostic
05:20:25.893171 BaseLogger.RegisterWriter: writer type Microsoft.TeamFoundation.DistributedTask.Agent.Logger.FileWriter
05:20:25.908763 Exe location hash = 13e94c652cf547ecb6da9b16928de37f
05:20:25.908763 Exe location hash = 74c7e125df21f66fe28c26f67ea7c650
05:20:25.908763 BaseLogger.LogConsoleMessage(scope.JobId = 00000000-0000-0000-0000-000000000000, message = Authenticating to the server http://MyTeamServer:8080/tfs/)
05:20:25.924388 JobManager.LogConsoleMessage (scope.JobId = 00000000-0000-0000-0000-000000000000, message = Authenticating to the server http://MyTeamServer:8080/tfs/)
05:20:25.924388 JobManager.LogConsoleMessage - job not found in dictionary (scope.JobId = 00000000-0000-0000-0000-000000000000)
05:20:25.924388 Authenticating to the server http://MyTeamServer:8080/tfs/
05:20:26.127517 Created Session: c8e746a3-7ac7-46c1-b9af-28a1f9fcc7c1
05:20:26.127517 MessageQueueListener.DispatchAsync - starting loop
05:20:26.127517 MessageQueueListener.DispatchAsync - Getting message from Session: c8e746a3-7ac7-46c1-b9af-28a1f9fcc7c1
05:20:26.143143 Waiting for shutdown request event on background thread: True
05:20:26.143143 Waiting for Escape key on background thread: True
05:21:16.175355 MessageQueueListener.DispatchAsync - message received.
05:21:16.175355 MessageQueueListener.DispatchAsync - No message retrieved from Session: c8e746a3-7ac7-46c1-b9af-28a1f9fcc7c1

AgentPool screen snap

Build definition

Build status

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
karthickj25
  • 1,207
  • 9
  • 16

2 Answers2

2

Update from OP

It was the Visual studio backgroud agent job service that was causing the issue. After restarting this my agent picked the job.. Many thanks

enter image description here


Please double check the step and configuration of your build agent following this tutorial: Deploy an agent on Windows

Make sure in your build definition you have select the right agent queue. Also try to create a empty build definition with no build task to see if the issue is related to the definition. And also restart your agent service on your TFS server.

If above is still not work, check the event view and the log in \agent_diag on build agent to see whether there are some useful information for trobule shooting.

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • I have recreated the agent using the link, but no luck, I also tried removing all the steps but it stays with same message. \agent_diag is not creating any log when i request for the build – karthickj25 Oct 24 '16 at 07:37
  • Make sure the service `Visual Studio Team Foundation Background Job Agent` is running. If not, start it manually and try the build again. Also make sure your agent service is running which is VSO Agent *(your TFS server)* – PatrickLu-MSFT Oct 25 '16 at 07:27
  • Hi @Patrick-MSFT I cannot find "Visual Studio Team Foundation Background Job Agent" in my "build server". – karthickj25 Oct 25 '16 at 09:03
  • There should be one https://msdn.microsoft.com/en-us/library/ms252450(v=vs.120).aspx .Moreover did your agent service runs correctly? – PatrickLu-MSFT Oct 25 '16 at 09:53
  • 1
    Team Foundation Background Job Agent runs in TFS server, i was looking for it in my build server, and the VSO agent runs fine on build server too. – karthickj25 Oct 25 '16 at 10:42
  • 1
    The issue was indeed with "Visual Studio Team Foundation Background Job Agent" service, restarting it solved my problem, also the emails were not triggering before.. After restart email notifications and build works smoothly. – karthickj25 Oct 27 '16 at 11:41
0

Compare the build demands against the agent capabilities. If the agent doesn't fulfill the demands it will never build.

enter image description here

enter image description here

chief7
  • 14,263
  • 14
  • 47
  • 80