How to determine why an agent pool is offline in Azure dev-ops

17,692

Solution 1

The VM that host the build agents can have a auto shut down time. Make sure your build vm is running by going to Virtual machines in the azure portal

Solution 2

Try logging into the VM, and run the run.cmd from an elevated powershell prompt in your agent directory. Source: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops

Solution 3

Login to powershell.Navigate to the agent folder where it contains run cmd prompt and config cmd prompt.

Execute the following command

.\run.cmd

Solution 4

  • Check the date and time on your VM. If it's wrong, correct it.

  • Then run powershell as administrator and cd into the azagent folder that contains the run.cmd file (most likely C:\azagent\A4).

  • Execute the following command:

    .\run.cmd

Share:
17,692

Related videos on Youtube

user1038502
Author by

user1038502

Updated on June 04, 2022

Comments

  • user1038502
    user1038502 almost 2 years

    I noticed that all of my builds suddenly got stuck. If I click the build I get the following error: All eligible agents are disabled or offline

    When I check my agent pools I get the following: enter image description here

    How can I bring them online/determine why they are offline?

  • Rastaban
    Rastaban almost 5 years
    I had a similar problem but the VM was still alive. I realized I was not installing the latest version of the agent tools. Once I installed the latest tools the issue seems to be fixed (or at least it has not come back in the past few hours)
  • Vin Shahrdar
    Vin Shahrdar about 2 years
    I noticed that my agent folder is gone. How can that be?
  • gin93r
    gin93r about 2 years
    I'm having the same issue. I went as far as reinstalling the deployment agent (as a service) and it's still failing.
  • gin93r
    gin93r about 2 years
    This didn't work for me. I reinstalled the deployment agent and it failed right off the bat. Restarting the VM fixes it short-term, but that's a workaround and not a solution.