Azure ACI — unify-ui container fails to start

Support DQE
Support DQE
  • Updated
Troubleshooting · Azure ACI · unify-ui

Fix the unify-ui container that no longer starts on Azure ACI after a restart, with the error "npm": executable file not found in $PATH.

Symptoms

  • The DQE One interface no longer loads in Salesforce, usually right after the scheduled daily restart of the ACI.
  • In the Azure portal, under Containers, the unify-ui container is in the Waiting state with the detail CrashLoopBackOff. Because the containers of the group depend on each other to start, the containers that rely on it are blocked too: nginx stays in Waiting to run and one-server shows Terminated.
  • The Events tab of the unify-ui container shows the error below.
Error message
Failed to start container unify-ui, Error response: to create containerd task: failed to create shim task: ... exec: "npm": executable file not found in $PATH: unknown
  • Connecting to the container from the portal returns a ResourceNotReady error. This error is a consequence, not the cause: the connection fails because the container is not running.

Cause

At each restart, the ACI pulls the container images again, using the tags defined in its configuration. Recent builds of the unify-ui image (dqe-one-custom-ui) no longer include npm and start with their own built-in command.

If the container group configuration defines a command such as npm start for the unify-ui container, Azure tries to run this command, cannot find npm, and the container stops before the application starts. The reference ACI configuration does not define any command for unify-ui.

Check whether your ACI is affected

Run the following command in Azure CLI or Azure Cloud Shell:

az container show -g <resource-group> -n <container-group> --query "containers[?name=='unify-ui'].command" -o json

If the result contains "npm" and "start", your configuration is affected.

How to fix the unify-ui container

Azure Cloud Shell — The startup command of a container cannot be edited from the Azure portal interface. Use Azure CLI: the simplest option is Azure Cloud Shell (the >_ icon at the top of the Azure portal), where Azure CLI is already installed.

1. Export the current configuration

az container export -g <resource-group> -n <container-group> -f aci-unify.yaml

This YAML file is the ACI equivalent of a docker-compose.yml file. There is no file to download from DQE: you always start from your own configuration.

2. Remove the command from the unify-ui container

Open the file, for example with code aci-unify.yaml in Cloud Shell. In the unify-ui container block, delete the command field and its lines (npm, start). Do not change the other containers.

Recommended: if the one-server container uses the command bash ./entrypoint.sh, replace it with the command from the reference configuration. It makes one-server wait for Redis and RabbitMQ before starting:

command:
  - bash
  - -c
  - "until (echo > /dev/tcp/127.0.0.1/6379) 2>/dev/null && (echo > /dev/tcp/127.0.0.1/5672) 2>/dev/null; do echo waiting-for-redis-rabbitmq; sleep 3; done; exec bash ./entrypoint.sh"

3. Fill in the values missing from the export

For security reasons, Azure does not include secrets in the exported file. Add them back before redeploying:

  • the image registry password (imageRegistryCredentials.password), provided by DQE;
  • the storage account keys of the volumes (rabbitvol, nginxconf, redisvol), available in Storage account > Access keys;
  • the Log Analytics workspace key (diagnostics.logAnalytics.workspaceKey);
  • any environment variable defined as secureValue, such as SESSION_SECRET or the RabbitMQ password.

4. Redeploy the container group

az container create -g <resource-group> -f aci-unify.yaml

Data stored on the Azure file shares is kept.

5. Check that all containers are running

az container show -g <resource-group> -n <container-group> --query "containers[].{name:name, state:instanceView.currentState.state}" -o table

All containers must be in the Running state. Then check that the Application Gateway health probe is Healthy and that the DQE One interface loads in Salesforce.

If Azure refuses to update the container group

If Azure asks you to delete the container group before recreating it, check these points first:

  • The exported file must contain the subnetIds block of your VNet subnet. Without it, the recreated container group is no longer connected to your private network or to the Application Gateway.
  • After recreation, the private IP address of the ACI can change. Update the Application Gateway backend pool with the new address, as described in the ACI installation guide.

Then delete the container group with the command below and run the az container create command again.

az container delete -g <resource-group> -n <container-group>

When to contact DQE Support

If a container is still not running after the fix, contact DQE Support and provide:

  • the exported container group configuration, with passwords and keys masked;
  • the full error message from the Events tab of the failing container;
  • the container logs, retrieved with the command below;
  • the date and time of the last restart.
az container logs -g <resource-group> -n <container-group> --container-name <container>

Related articles

Was this article helpful?

0 out of 0 found this helpful