0
votes

I could able to download the private agent and tried to configure the agent with my laptop/local machine.At particular step its failing with the below error:

Error:

Loading RSA key parameters from file C:\vsts-agent-win-x64-2.127.0.credentials_rsaparams [2018-02-02 11:31:54Z WARN VisualStudioServices] Attempt 1 of POST request to projname.vssps.visualstudio.com/_apis/oauth2/token failed (WinHttp Error: ERROR_WINHTTP_TIMEOUT). The operation will be retried in 10.89 seconds

Its failing After the steps like server URL,PAT,agent pool name.Its saying connecting to server and then at testing agent connection step its taking some time and then cmd abruptly closing itself.So please do the needful.I have all the logs its creating under C:\vsts-agent-win-x64-2.127.0_diag folder.

1
Did you take more than 5 minutes for config your agent? What if you immediately input the agent pool after the console asks?Marina Liu
@ Marina Liu - MSFT, Yes,Its taking more than 5 minutes.After inputting he agent pool,I am getting the console messages scanning for tool capabilities,connecting to the server,successfully added the agent.After this testing agent connection point its taking more than 5 minutes and console is closing abruptly.So please help me what can I do here?PRAVEEN
@PRAVEEN it appears your agent doesn't have access to the internet. What have you done to ensure it does, and can successfully connection to visualstudio.com?raterus
@PRAVEEN What if you execute set VSTS_HTTP_TIMEOUT=600 in powershell (timeout after 10 min) if you can using Windows OS, then close the agent config window, and reopen powershell window as Administrator to config your private agent? Besides, you can check connection to VSTS, you can clone a git repo from VSTS to check the connection.Marina Liu
@ raterus,yes,I do have internet connection and console saying that the connection is established and I can see the agent pool name in VSTS.The console is not coming to online in VSTS(Showing offline')because of its testing the connection establishment step is not properly done and console is closing abruptly at this particular step while configuring the agent from command line.PRAVEEN

1 Answers

0
votes

For timeout error when configuring a private agent, you can set the variable VSTS_HTTP_TIMEOUT bigger than it’s default value, such as set VSTS_HTTP_TIMEOUT=600.

For the new configured agent doesn’t show under agent queues, you can add it manually. Or when you creating a agent pool, make sure Auto-provision Queues in all Projects option is select, so the agent pool will auto showed under all projects agent queues.

enter image description here

For the error "No registered agents found in the selected queue with the following capabilities: maven. Use a different queue" when queuing a build by the agent, you should make sure maven is installed on the agent machine, and also check if maven is added under the agent capabilites. If maven is not added in the agent capabilities, you can add it manually by providing the name and the path for maven similar as below:

enter image description here

enter image description here