Build Agent is Offline

别说谁变了你拦得住时间么 提交于 2020-01-23 00:30:14

问题


I m using TFS 2015, I saw that my build Agent is Offline :

I launch the VsoWorker.exe to see the logs and understand the error, Here is what I get but I found nothing from the internet : Any Idea please ?

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() 

回答1:


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

  2. Make sure the account that the agent is run under is in the "Agent Pool Service Account" role.

  3. Try to change a domain account which is a member of the Build Agent Service Accounts group and belongs to "Agent Pool Service Account" role, to see whether the agent would work or not.




回答2:


When you install the Build Agent you are instructed to make a C:\Agents folder:

If you have not first configured the Build Agent, open Powershell and run this command:

PS C:\agent> .\config.cmd

In the config setup there is an option to run the Build Agent as a Window Service. This way you don't need to start it each time the machine reboots.

If you've found the BuildAgent has been installed but is offline, it's probably not been configured to run as a Service and you will need execute this command to run the Build Agent or just double click the file:

PS C:\agent> .\run.cmd

This should bring the Build Agent online.

Note: The 1st time I tried this and it worked. The second time it didn't and I ran the C:\agent\bin\Agent.Listener.exe instead. I tried a 3rd time running the run.cmd and this time I waited a minute or 2 and it worked:

Note: You're better off making the agent run as a Service, this way you only need to run the config.cmd once and never need to run the run.cmd.




回答3:


Don't run the VsoWorker.exe application directly. Use the RunAgent.cmd file.



来源:https://stackoverflow.com/questions/40769292/build-agent-is-offline

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!