Hi ,
Thanks for reaching out to Microsoft Q&A.
It seems you have already checked several key areas, including agent capabilities, approval status, and demands.
1. Verify Agent Pool Configuration
- Go to Azure DevOps > Organization Settings > Agent Pools.
- Check if the agent pool associated with your pipeline has the expected agents.
- Ensure that the correct agent pool is being referenced in the pipeline YAML.
2. Check for Stale Pipeline Runs
- Go to Pipelines > Runs and see if any previous runs are stuck in a waiting or running state.
- If there are, cancel them and retry running your pipeline.
3. Ensure There Are No Conflicting Demands
- You mentioned that the demands do not explicitly restrict the agent, but try running:
pool: name: Default demands: []
- This removes all demand restrictions to see if the pipeline can run on any agent.
4. Force Run on a Specific Agent
If you suspect a scheduling issue, try specifying the exact agent in your pipeline YAML:
pool: name: Default demands: - Agent.Name -equals BUILDAGENT01
- Replace BUILDAGENT01 with the agent name you want to use.
5. Check Agent Logs
- On the self-hosted agent machine, check the logs at:
C:\agent_diag
- Look for errors or warnings related to agent connectivity or pipeline execution.
6. Restart Agents
- On the affected agents, restart the Azure DevOps agent service:
Stop-Service vstsagent.service Start-Service vstsagent.service_
- Alternatively, restart the build server entirely.
7. Reinstall the Agent
- If issues persist, unregister the agent and reinstall it:
.\config.cmd remove
- Then, reconfigure it using:
.\config.cmd
8. Check for Job Timeout Issues
- Some jobs may be timing out without obvious failure messages.
- Try increasing the timeout in your YAML:
jobs: - job: MyJob timeoutInMinutes: 120 # Increase as needed
9. Verify Parallelism Settings
- Go to Agent Pool Settings and check the Maximum Parallel Jobs limit.
- If it's low, increase it to allow more jobs to run concurrently.
10. Check Azure DevOps Service Status
- Sometimes, DevOps has service disruptions affecting agents.
- Check Azure DevOps Service Status for any incidents.
Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.