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

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?



Solution 1:[1]

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 2:[2]

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 3:[3]

  • 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

Solution 4:[4]

For me, issue was suddenly agents were reporting offline on the portal.

  1. Restarted the agent service in the VM - didn't help
  2. Removed config file also didn't help because logs were showing that dev.azure.com wasn't connecting
  3. Simply just restarting VM helped, but still couldn't able to find the cause.

Solution 5:[5]

My agent stopped going live when I updated our Azure Devops to the latest version 2019.1.3 iirc.

To solve this I did the following:

  1. Went to services.msc on the agent machine. Stopped the existing service.
  2. Went to agent folder and removed the existing configuration via "config.cmd remove"
  3. Downloaded latest agent code from the Azure Devops Agent Pools portal page.
  4. Replaced contents of old agent with new agent files.
  5. Went back to agent folder and configured a new agent via "config.cmd". Told it to start as a service.

Voila! Service back running again.

Solution 6:[6]

One of my Azure agents started showing as offline. As a test, I ran curl https://dev.azure.com/{organization} and got back an error "curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed".

I fixed the issue by downloading IISCryptoCli.exe from https://www.nartac.com/Products/IISCrypto/Download and then running "IISCryptoCli.exe /template default /reboot".

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Niharika
Solution 2 Rajan
Solution 3 Emeka Anachebe
Solution 4 Jaydeep Soni
Solution 5 Shiv
Solution 6 twasbrillig