Search code examples
tfsbuildtfs-2015azure-pipelinesazure-pipelines-build-task

vsoagent /configure hangs silently


We have TFS2015 update 2 installed on an on-prem server. From a (to be) build server vm, I've browsed to the tfs server and downloaded the build agent and unzipped.

If I run "ConfigureAgent.cmd" from an admin elevated Powershell window, I get no response back.

On checking the "_diag" folder I see a log file with the following output:

15:13:13.913803 Sending trace output to log files: D:\Build\_diag
15:13:13.945096 VsoAgent.exe was run with the following command line:
"D:\Build\agent\VsoAgent.exe" /configure
15:13:14.038805 SettingsFileHelper.Load - settings[AutoUpdate]=True
15:13:14.038805 SettingsFileHelper.Load - settings[RootFolder]=D:\Build
15:13:14.038805 SettingsFileHelper.Load - settings[WorkFolder]=D:\Build\_work
15:13:14.038805 SettingsFileHelper.Load - settings[ServerUrl]=
15:13:14.038805 SettingsFileHelper.Load - settings[AgentName]=Agent-SDEIDBT02
15:13:14.038805 SettingsFileHelper.Load - settings[PoolId]=
15:13:14.038805 SettingsFileHelper.Load - settings[PoolName]=default
15:13:14.038805 SettingsFileHelper.Load - settings[AgentId]=
15:13:14.038805 SettingsFileHelper.Load - settings[RunAsWindowsService]=False

There are no clues in the event log. The account I'm using to run the Powershell session is a member of "Project Collection Build Administrators" in the relevant collection. It is also a member of the local admin group on the build server.

I've tried running vsoagent.exe /config also but get the same response - i.e. nothing!

A different team does have an agent running successfully against the same TFS collection.

Any ideas what else I could try to get this agent configured?


Solution

  • A little embarrassed, but it's a RTFM answer as proposed by @starain-MSFT. When the .cmd was run from the command line, rather than PowerShell, then it worked. I then ran into another problem but was able to find the answer here: Configuring a TFS2015 build agent fails because agent pool not found. Why?