Application package is not deployed to Azure Batch Node

yuriy@mquark.com 40 Reputation points
2025-03-01T20:21:33.1933333+00:00

I followed the steps described at: https://learn.microsoft.com/en-us/azure/batch/batch-application-packages. In particular:

  • Created a zip package containing my custom app
  • Added it to the list of Applications in my Batch Account
  • Added Application Package Reference at Pool level pointing to the above app

After the Pool Node is up, there is no applications present in root/applications directory. I checked the environment variables (with cmd /c set), and there is no variable named after my custom app (e.g. AZ_BATCH_APP_PACKAGE_my-demo-app#1). I am also not seeing any errors at Pool/Node level - everything looks healthy.

How do I debug this problem?

Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
356 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mounika Reddy Anumandla 2,585 Reputation points Microsoft External Staff
    2025-03-03T01:40:31.18+00:00

    Hi ******@mquark.com,

    Welcome to Microsoft Q&A Platform!

    If your Azure Batch application package is not showing up in the /root/applications directory, follow these debugging steps:

    Run the following command to check if your pool has the correct application package reference:

    az batch application package list --application-name applicationpackagename --name mounibatch --resource-group resourcegroupname

    If it's empty, you need to reassign the package to the pool using: *az batch pool set *

    *--account-name mounibatch *

    *--account-endpoint https://mounibatch.eastus.batch.azure.com *

    *--pool-id my-test-pool2 *

    --application-package-references mounikaappid#1.1

    After you reassign the package, it should show like below. User's image

    Environment variable visibility

    These environment variables are visible only in the context of the task user, which is the user account on the node under which a task is executed. You won't see these variables when connecting remotely to a compute node via Remote Desktop Protocol (RDP) or Secure Shell (SSH) and listing environment variables. This is because the user account that is used for remote connection is not the same as the account that is used by the task.
    https://learn.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables

    Instead of set, use WMIC (Windows Management Instrumentation Command-line):

    wmic ENVIRONMENT where "Name like 'AZ_BATCH_APP_PACKAGE%'" get Name,VariableValue

    This works because WMIC queries all environment variables, including those set by Azure Batch.
    User's image

    If the error still persists, delete and recreate the pool to force Azure to reapply the application package.

    Hope this helps!

    Let me know if you have any further queries!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.