Sorry can't see the error details, but have you checked the ubuntu firewall (ufw) whether the required communication is allowed ? Any other VM in the same subnet can access the Ubuntu on the same ports (as the gateway is trying to reach) ?
Gateway 502 error
I cannot connect to my backend server which is azure VM (ubuntu 20.04 server). I've attached error detail and my NSG. I've tried most of the troubleshoot documents from microsoft.
Cannot connect to backend server. Check whether any NSG/UDR/Firewall is blocking access to the server. Check if application is running on correct port. To learn more visit - https://aka.ms/servernotreachable.
Azure Application Gateway
2 answers
Sort by: Most helpful
-
-
msrini-MSFT 9,291 Reputation points Microsoft Employee
2023-01-22T09:48:43.3133333+00:00 Hi, Can you check if you have specified the right IP address in the backend pool of Application gateway? Also check if your service is running on port 80 and it is accessible locally. Then you can check your ip tables whether the traffic is allowed or not.