question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deploy fails at redis container app

See original GitHub issue

Please provide us with the following information:

This issue is for a: (mark with an x)

- [X ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

azd up

Any log messages given by the failure

Deployment Error Details: ContainerAppOperationError: Failed to provision revision for container app ‘redis’. Error details: Operation expired.

Issue Analytics

  • State:open
  • Created 3 months ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
Jeroen-VdBcommented, Jun 9, 2023

I was able to resolve this by reverting back to the latest available version included in the documentation. Next, because the service and serviceBind properties were not recognized, I commented them out and was able to successfully deploy the template. Not sure what these properties do exactly.

I changed container-app.bicep as follows:

resource app 'Microsoft.App/containerApps@2022-11-01-preview' = {
  name: name
  location: location
  tags: tags
  // It is critical that the identity is granted ACR pull access before the app is created
  // otherwise the container app will throw a provision error
  // This also forces us to use an user assigned managed identity since there would no way to 
  // provide the system assigned identity with the ACR pull access before the app is created
  dependsOn: usePrivateRegistry ? [ containerRegistryAccess ] : []
  identity: {
    type: normalizedIdentityType
    userAssignedIdentities: !empty(identityName) && normalizedIdentityType == 'UserAssigned' ? { '${userIdentity.id}': {} } : null
  }
  properties: {
    managedEnvironmentId: containerAppsEnvironment.id
    configuration: {
      activeRevisionsMode: revisionMode
      ingress: ingressEnabled ? {
        external: external
        targetPort: targetPort
        transport: 'auto'
        corsPolicy: {
          allowedOrigins: union([ 'https://portal.azure.com', 'https://ms.portal.azure.com' ], allowedOrigins)
        }
      } : null
      dapr: daprEnabled ? {
        enabled: true
        appId: daprAppId
        appProtocol: daprAppProtocol
        appPort: ingressEnabled ? targetPort : 0
      } : { enabled: false }
      secrets: secrets
      //service: !empty(serviceType) ? { type: serviceType } : null
      registries: usePrivateRegistry ? [
        {
          server: '${containerRegistryName}.azurecr.io'
          identity: userIdentity.id
        }
      ] : []
    }
    template: {
      //serviceBinds: !empty(serviceBinds) ? serviceBinds : null
      containers: [
        {
          image: !empty(imageName) ? imageName : 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
          name: containerName
          env: env
          resources: {
            cpu: json(containerCpuCoreCount)
            memory: containerMemory
          }
        }
      ]
      scale: {
        minReplicas: containerMinReplicas
        maxReplicas: containerMaxReplicas
      }
    }
  }
}
0reactions
giorgiococcicommented, Jun 13, 2023

@Jeroen-VdB thank you for the work around you proposed, it also solved the same problem for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker-compose deploying redis but app.js refuses ...
1 Answer 1 ... The node application is expecting the redis to be on the localhost, which it is not. You can provide...
Read more >
Fails to connect to redis, when running inside of docker ...
My application is a microservice, which connects to a redis database, which is running inside of docker. However, I can not connect to...
Read more >
Deploying a pod running a local app and a redis container
Greetings. I'm currently trying to run a pod containing my local user api and a redis container as the first needs to connect...
Read more >
redis container failed to connect - SCIM bridge deployment ...
Basically, we used the guide from 1Password github to set up our SCIM bridge and it seems like the redis container cannot start...
Read more >
Unable to pull remote image for multi-container web ...
The web app using this deployment setup has been working flawlessly for several months (it's a multi-container web application deployed from my ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found