Skip to content

Restart an agent

You might need to restart your agent from time to time for any of the following reasons:

  • Agents can sometimes crash or become unstable.
  • You changed the agent's configuration.
  • You added a new certificate to be used for setting up a proxy server.
  • To receive agent updates.

This guide will explain how to restart an AWS ECS Fargate agent and an Azure agent.


Prerequisites

You need access to your AWS or Azure account with the appropriate permissions.


Restart an AWS ECS Fargate agent

To restart your AWS agent, you are required to make some modifications to your Hybrid SaaS agent on AWS ECS. Follow these steps:

Deploy to 0 instructions

1. Access the service

  1. Log in to your AWS console, locate the ECS service running your agent, and click Update service.

2. Force new deployment

  1. In the update options, select Force new deployment.
  2. Set the Desired tasks count to 0.

This action will break the service’s reliance on the image digest and relink it to the tagged image. This reassociation will persist until the service is redeployed with a desired task count greater than 0.

3. Apply changes

  1. Click Update to apply these settings.
  2. Wait for the service’s Last deployment status to show as Completed.

4. Restore desired task count

  1. Once the deployment is complete, return to Update service.
  2. Set the desired task count back to your normal operational requirements.
  3. Ensure that Force new deployment is not selected.
  4. Click Update again.

Your agent will now restart and continue as before, with updates proceeding as normal unless a "Force new deployment" is triggered again with a task count greater than 0. For more information about updating your agent, read Tech note: updating Hybrid SaaS agents on AWS ECS.


Restart an Azure agent

There are two ways you can restart an Azure agent:

  • The Azure Portal
  • The Azure CLI

Using the Azure Portal

To restart your agent using the Azure Portal, follow these steps:

  1. Log in to the Azure Portal.
  2. In the search bar at the top of the Azure Portal, enter "Container apps", and click the Container Apps link in the results menu.
  3. Click your chosen container app from the list.
  4. Click Application to display a context menu.
  5. Click Revisions and replicas.
  6. Click on the name of the intended Active Revision.
  7. A panel to the right will appear. At the top of Revision details, click Restart.

Using the Azure CLI

To restart your agent, you can open the Azure CLI either locally on your machine, or through the Azure portal.

Use the following command:

az containerapp revision restart --revision <REVISION_NAME> --resource-group <RESOURCE_GROUP_NAME> --subscription <SUBSCRIPTION_NAME>"

For example, if you have an agent called cloud-agent-dev in a resource group called cloud-agent-dev, and your Azure subscription is called Matillion DPC Dev, you are required to use the following command:

az containerapp revision restart --revision cloud-agent-dev --resource-group cloud-agent-dev --subscription "Matillion DPC Dev"