An Azure service that provides a general-purpose, serverless container platform.
Hi @AzureRACO ,
Thanks for reaching out to Microsoft Q&A.
Since the app was working before and is now throwing a 502 Bad Gateway, the issue is likely with the Application Gateway configuration or network routing. Double-check:
- NSG/UDR rules: Double-check the NSGs on the subnets where both the Application Gateway and container app are located. Ensure that both incoming and outgoing traffic are allowed, especially for traffic from the Application Gateway’s frontend to the container app environment.
- Inbound NSG: Ensure it's allowing traffic from the Application Gateway subnet.
- Outbound NSG: Ensure outbound traffic is allowed from the container app to the Application Gateway.
- If you're using User-Defined Routes (UDRs), make sure there are no conflicting routes that might block the traffic to your container app.
- Health Probe Configuration:
You mentioned both probes show healthy, but it’s worth diving into probe settings:
- Protocol: Confirm the probe is set to HTTP/HTTPS (depending on your app’s setup).
- Path: Ensure the probe path is correct (e.g.,
/healthif that’s how your container app is set up). - Port: Confirm the probe is checking the right port (8080 in your case).
- Interval and Timeout: Double-check if the probe settings are too aggressive (timeouts too short, or probe interval too long). A smaller interval (e.g., 10 seconds) or longer timeout (e.g., 10 seconds) might help.
- Path: Ensure the probe path is correct (e.g.,
- Private DNS: You mentioned using private DNS. Verify that:
- The DNS resolution is correctly pointing to the correct backend IP.
- Ensure the DNS record has propagated correctly across the VNet (sometimes DNS issues can be subtle and take time to resolve across the network).
- App Gateway settings: Verify the correct backend pool, HTTP settings, and health probes are configured.
- Direct access: Test accessing the container app directly (bypassing AAG) to isolate if the issue is with the AAG.
A misconfiguration or missing setting in the AAG could be causing the 502 error. Hope this helps!
If the resolution was helpful, kindly take a moment to click on and click on Yes for was this answer helpful. And, if you have any further query do let us know.