azure-devopsazure-pipelinesagent

Azure Self Hosted pipeline agent no longer starts when I boot my PC


For the past year or so , I have had an Azure, self-hosted agent on this PC (on which I am typing this message). It performs my Azure Pipeline build of our application. But a Windows Update a couple of days ago appears to have made some change that prevents it from starting when I reboot. At least I think that's it. It's the only thing that changed on the PC.

I have rebooted a couple of times and every time I do, Azure reports the agent as "offline"

But if I go into the c:\agents folder and manually execute "run.cmd", then yes, the agent starts up and reports as online in Azure. But that is starting interactively, which I do not want; I see DOS boxes popping up every time I cancel a job.

When I created it, I set it to run as a service. That is how I want it to start.

Can anyone tell me how to diagnose this and how to make it start again as a service? Is there a Windows service that Azure uses for agents I can examine for startup properties or something like that?

I don't want to remove and recreate this agent, I just want to fix the existing one.


Solution

  • You can try to check with the following things:

    1. On the agent machine, open the Services management window to check and ensure the "Startup type" of the agent service is set to "Automatic" or "Automatic (Delayed Start)".

      enter image description here

    2. On Azure DevOps, open the pool where the self-hosted is in, click "Update all agents" to try to update the agent to the latest available version.

      enter image description here

    After above steps, reboot the agent machine to see whether the agent service can startup automatically.

    If the agent service still cannot startup automatically, you might need to remove and reconfigure the agent on the machine.