TFS Build Agent处于脱机状态

时间:2016-11-23 16:13:37

标签: tfs tfsbuild

我正在使用TFS 2015,我看到我的构建代理处于离线状态:

我启动VsoWorker.exe以查看日志并了解错误,这是我得到的但是我从互联网上找不到任何东西:有什么想法吗?

16:07:57.649004 Sending trace output to log files: C:\Users\Administrator\Downloads\agent\_diag
16:07:57.649004 vsoWorker.exe was run with the following command line:
"C:\Users\Administrator\Downloads\agent\Agent\Worker\VsoWorker.exe" 
16:07:57.649004 VsoWorker.Main(): Create AgentLogger
16:07:57.649980 VsoWorker.Main(): Parse command line
16:07:57.655848 ---------------------------------------------------------------------------
16:07:57.657635 System.Exception: The /name command line option is required and must have a value.

16:07:57.657635    at VsoWorker.CommandLine.ValidateCommandLine()

16:07:57.657635    at VsoWorker.CommandLine..ctor(String[] args)

16:07:57.657635    at VsoWorker.Program.Main(String[] args)
16:07:57.657635    at VsoWorker.CommandLine.ValidateCommandLine()

16:07:57.657635    at VsoWorker.CommandLine..ctor(String[] args)

16:07:57.657635    at VsoWorker.Program.Main(String[] args)
16:07:57.657635 ---------------------------------------------------------------------------
16:07:57.658878 BaseLogger.Dispose() 

3 个答案:

答案 0 :(得分:5)

TFS 2017:

安装Build Agent时,系统会指示您创建 C:\ Agents 文件夹:

enter image description here

如果您尚未首先配置Build Agent,请打开Powershell并运行以下命令:

PS C:\agent> .\config.cmd

最后执行此命令以运行Build Agent:

PS C:\agent> .\run.cmd

这应该使Build Agent在线。

注意:我第一次尝试这个并且有效。 第二次它没有,我运行了C:\ agent \ bin \ Agent.Listener.exe。我尝试了第三次运行run.cmd,这次我等了一个分钟或2分,它起作用了:

enter image description here

注意:最好让代理作为服务运行,这样您只需要一次config.cmd,而不需要运行run.cmd。

答案 1 :(得分:2)

  1. 确保您完全按照this article部署Windows构建代理。

  2. 确保运行代理的帐户位于"代理池服务帐户"作用。

  3. 尝试更改域帐户,该帐户是Build Agent Service Accounts组的成员,属于" Agent Pool Service Account"角色,看代理人是否有效。

答案 2 :(得分:1)

不要直接运行VsoWorker.exe应用程序。使用RunAgent.cmd文件。