Degraded revision in Container App

Rob Smith 0 Reputation points
2024-04-24T10:39:02.0566667+00:00

I have a container app that isn't deploying a new revision, following some code changes in the project.

The new revision is showing as "degraded". From the logs, it just says the revision is in an unhealthy state - no more errors that point me to the issue.

The only thing I can see is that despite the hosting environment being set to production, the log shows it is listening on http://localhost:5000. This doesn't seem right?

I am completely new to this, so please be as basic as you can!

Thank you.

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
324 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Deepanshukatara-6769 6,715 Reputation points
    2024-04-24T11:08:44.09+00:00

    Hi Rob,

    It seems like there might be a misconfiguration in your container app's deployment settings. Let's try for possible fixes:

    1. Unhealthy State: The fact that your new revision is showing as "degraded" indicates that something isn't working correctly with the new deployment. This could be due to various reasons such as code errors, missing dependencies, or incorrect configurations.
    2. Listening on localhost: You mentioned that despite the hosting environment being set to production, the log shows that it is listening on http://localhost:5000. This indeed seems unusual for a production environment because typically, a production environment would listen on a public-facing IP address or domain name rather than localhost. so please remove it and put the needed URL here , this could be a fix for it for example , check revision details and change it for prod as per your values User's image
    3. Verify health probes configuration For all health probe types (liveness, readiness, and startup) that use TCP as their transport, verify their port numbers match the ingress target port you configured for your container app.
      1. Sign in to the Azure portal.
      2. In the Search bar, enter your container app's name.
      3. Under Resources, select your container app's name.
      4. In the navigation bar, expand Application and select Containers.
      5. In the Containers page, select Health probes.
      6. Expand Liveness probes, Readiness probes, and Startup probes.
      7. For each probe, verify the Port value is correct.
      Update Port values as follows:
      1. Select Edit and deploy to create a new revision.
      2. In the Create and deploy new revision page, select the checkbox next to your container image and select Edit.
      3. In the Edit a container window, select Health probes.
      4. Expand Liveness probes, Readiness probes, and Startup probes.
      5. For each probe, edit the Port value as per your value
      6. Select the Save button.
      7. In the Create and deploy new revision page, select the Create button. Verify health probes configuration For all health probe types (liveness, readiness, and startup) that use TCP as their transport, verify their port numbers match the ingress target port you configured for your container app.

    Ref doc --> https://video2.skills-academy.com/en-us/azure/container-apps/troubleshooting#verify-health-probes-configuration

    kindly try all these solutions ,if it works please accept and if not please update us with details