Azure Container Apps fails to provision often if dapr is enabled

Andrew Uy 11 Reputation points
2022-03-21T00:09:57.827+00:00

I have been trying out the Azure Container Apps with Dapr. I know it is in Preview but would be great if this is sorted out so that when it is available publicly we know it does work. So what happen is that every time I create a Container App with Dapr enabled, the Provision Status will be in Failed status in the revision. Sometimes, when I just spin up another revision with no changes into it, it get Provisioned. It is inconsistent though on what is really going on.

184914-containerapp-dapr.png

Here are the different commands I have been doing which creates the container apps but normally fails in the provisioning part:

az containerapp create `  
  --name front `  
  --resource-group $RESOURCE_GROUP `  
  --environment $CONTAINERAPPS_ENVIRONMENT `  
  --image docker.io/uyandrew/container-app-front:latest `  
  --target-port 80 `  
  --ingress 'external' `  
  --min-replicas 1 `  
  --max-replicas 1 `  
  --enable-dapr `  
  --dapr-app-port 3002 `  
  --dapr-app-id front  


az containerapp create `  
  --name front `  
  --resource-group $RESOURCE_GROUP `  
  --environment $CONTAINERAPPS_ENVIRONMENT `  
  --image docker.io/uyandrew/container-app-front:latest `  
  --target-port 80 `  
  --ingress 'external' `  
  --min-replicas 1 `  
  --max-replicas 1 `  
  --enable-dapr `  
  --dapr-app-port 3002 `  
  --dapr-app-id front `  
  --secrets "storage-account-name=${STORAGE_ACCOUNT},storage-account-key=${STORAGE_ACCOUNT_KEY}" `  
  --dapr-components ./components.yaml  

Initially I though that it was to do with dapr-app-id, dapr-app-port, or even the dapr-components but with the one I have created where it failed and then it succeeded after the second revision and failed in the third revision which all those revisions are just creating new revision with no changes, it make me think that there might be something with provisioning those container app with dapr that is causing the problem.

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
716 questions
Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
474 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Andrew Uy 11 Reputation points
    2022-03-21T06:37:20.163+00:00

    Upon frequent trial and error, I just realized that the issue is the --dapr-app-port value I have placed. Initially I thought this was the dapr port but upon reading the help (az containerapp create --help) it refers to the port of the app. So when I have set it to 80, it is now working as expected.

    2 people found this answer helpful.

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.