Search code examples
azureazure-application-gatewayazure-container-instances

Why is Azure Application Gateway Returning a 502


Architecture

As depicted above, I have a container running in ACI where it binds to two ports. That container talks to a database on :5432.

Using Azure Application Gateway, I have setup 2 listeners, 2 rules, and 2 backend settings to route https traffic over 443 to the two ports in the container.

The admin.d.com resolves and works no problem. The enroll.d.com returns a 502 Bad Gateway.

Since I have them setup the exact same way just with their different sub domains and ports, I'm at a loss. In the resource group / vnet, I don't have anything else running, this is a fresh instance.


Solution

  • As @DusDee stated in the comments, my issue was due to the health probe failing. I created a custom health probe with parameters for my system (valid codes of 200-499) and the connection began working.