Build is succeed but Agent is still running - azure-devops

Configured self-hosted Agent skipping sslcertvalidation as we were facing issue .
Even though build is succeed but Agent is still running ...( In logs it's showing build is successd)
If I check the logs from Agent Machine it's showing "try to append 1 batches web console line for record '96defxxxxxxxxxxxx' , success rate : 1/1

Your self-hosted build agent is always running otherwise you would not be able to contact it from Azure DevOps to trigger builds.
Unless you see any errors or warnings in Azure DevOps you are fine.

Related

The agent request is not running because all potential agents are running other requests

We are running a pipeline that has run successfully for ages. It is failing as of yesterday. We are getting the error
The agent request is not running because all potential agents are running other requests.
The agent pool is offline
This stackoverflow solution says I need to run.cmd, but I am not running a self-hosting agent.
We also get this additional error
Failed to get scaleset from Azure with error: No service Endpoint found with Id: xxxx and Scope xxxx
How do I bring the agent back online and is that the solution to fix the error that is preventing the publish/deploy. If not, how do we fix this issue.
There are three kinds of icon of agent pool in Azure DevOps.
Microsoft-hosted agent:
Self-hosted agent:
VMSS(Azure Virtual Machine Scale Set):
So the type you are using is VMSS(Azure Virtual Machine Scale Set) pool. This type of agent pool will based on service connection of one of your project or subscription.
So if the machines are in the VMSS, you can try to edit your VMSS pool settings on Azure DevOps side, you can set up another service connection(please make sure the related register app on azure portal side has required permissions to the VMSS).
If no machine instances or the previous instances were been deleted, then the object on DevOps side will not be able to recovery. You can rec-config to a new VMSS or delete the old pool and create a new one.

Cannot run ASP.NET Core Web API on Azure Devops deployment group (self-hosted)

Im working on a simple deployment pipeline with azure devops. I created a deployment pipeline running on a self hosted ubuntu deployment group.
The pipeline looks like this:
Download artifacts from CI pipeline (created with dotnet publish)
Stop running deployment
Unzip the ASP.NET Core Web API to the deployment directory
Run new deployment with dotnet MyApp.dll
The first two steps work as expected. However, when the dotnet My App.dll command is run, the process runs for 10 seconds with following "error" message being printed at the end:
The STDIO streams did not close within 10 seconds of the exit event from process '/usr/bin/bash'. This may indicate a child process inherited the STDIO streams and has not yet exited.
The deployment task is successful despite the message and the app not running. I tried to work around this feature by using nohup & and relocating the command output. After some research I found that all processes started by a pipeline agent are stopped after the agent's work is done - meaning this behaviour is intended and my understanding of azure deployments/agents is wrong.
How do I deploy and run my app in an automated way on my own ubuntu machine using azure devops pipelines?
How do I deploy and run my app in an automated way on my own ubuntu machine using azure devops pipelines?
You are already on the right way.
All the process launched in the pipeline will be finished/clean up in “Finalize Job” step when the pipeline is over.
If you don't want the process to be closed, please try set variable Process.clean= false to stops the "finalize job" step from killing all processes.
But when you create a new pipeline next time, you need to close the app before starting it.

Running issue when buid defenation execute using microsoft host agent?

When I execute the build definition using Microsoft agent, the below error is reflecting
Error: The agent request is not running because all potential agents are running other requests. The current position in the queue: 1
The build execution took days and it is bonded. Can someone please help me to run out of this issue?
Scenarios I tried:
reinstalling the self-hosted agent and reconfigure the agent again.
I am trying with Microsoft agent "Azure pipelines"
Running issue when buid defenation execute using microsoft host agent?
If your pipeline queues but never gets an agent, check the following items:
Parallel job limits - no available agents or you have hit your free limits
You don't have enough concurrency
Your job may be waiting for approval
All available agents are in use
Demands that don't match the capabilities of an agent
Check Azure DevOps status for a service degradation
Please check this document for some more details.
Note: Please also check if Microsoft Hosted Pool `Azure Pipelines' are stuck on builds that you cancelled and deleted.
If above not help you, please share more info about your definition to help us to find the reason for this issue:
Agent pool info:
Execution plan info:
Parallel jobs info (And click the link View in-progress jobs):

How to know which machines were skipped during DevOps Release using Azure Pipeline Agents for a Deployment Group

I'm using Azure Pipeline Agents on Machines and have those Machines in a Deployment Group and I have a DevOps Release which does some things on each machine. If the Azure Pipeline Agent isn't running on a machine at release time, the release will skip over this machine (see below image). How can I know which machines were skipped?
!]1
How can I know which machines were skipped?
The easiest way to check is that you can manually check the detailed deployment log.
For example:
Then you could get the skipped agent name.
On the other hand, you could also use the Rest API : Releases - Get Release. In the API response, you could check the Job Status and the Agent name.
Here is sample:
GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}?api-version=6.0

'Fail on Standard Error' option ignored during deployment

I've recently had an issue using Azure DevOps pipelines when deploying a release.
I'm using a set of Tasks to take a VM snapshot, install the application, start services to multiple websphere application servers in parallel and then delete the VM snaps if release is successful.
The 'delete snapshot' step is marked to run 'only when all previous jobs have succeeded' and the application install step has the 'Fail on Standard Error' checked in the Task's Advanced option.
The release deployed successfully to 1 server and failed on another because the service didn't start. both the checks were then ignored and the snapshot was deleted.
How can I get the Pipeline to fail when any one node has failed, instead of all of them?