Application gateway error 502

0 votes

I have set up a new Application Gateway by following the documentation. I have configured the backend pool and connected it to an App Service via FQDN. But, somehow I receive error 502 every time I browse to the gateway. Browsing to the website directly works without issues .

Apr 4, 2019 in Azure by sabby
• 4,370 points
1,724 views

1 answer to this question.

0 votes

You need to set up the health probes via ARM templates or using PowerShelI as they cannot be setup through Azure Portal if you have web apps in your backend pools. You need to leave the host field empty and set -PickHostNameFromBackendAddress property.

This code snippet should resolve your error:

# Create a probe with the PickHostNameFromBackendHttpSettings switch for web apps
$probeconfig = New-AzureRmApplicationGatewayProbeConfig -name webappprobe -Protocol Http -Path / -Interval 30 -Timeout 120 -UnhealthyThreshold 3 -PickHostNameFromBackendHttpSettings    

# Define the backend http settings
$poolSetting = New-AzureRmApplicationGatewayBackendHttpSettings -Name appGatewayBackendHttpSettings -Port 80 -Protocol Http -CookieBasedAffinity Disabled -RequestTimeout 120 -PickHostNameFromBackendAddress -Probe $probeconfig
answered Apr 4, 2019 by Prerna
• 1,960 points

Related Questions In Azure

0 votes
1 answer

I am getting a network related error saying "cannot connect to a server". need help here.

Actually i got the same error, it ...READ MORE

answered Apr 27, 2018 in Azure by null_void
• 3,220 points
1,065 views
0 votes
2 answers

In Azure powershell Select-AzureSubscription command fetching error: the subscription name doesn't exist

The problem you're having is that the ...READ MORE

answered Aug 16, 2018 in Azure by Priyaj
• 58,020 points
7,668 views
0 votes
1 answer

Is there a way to get ERROR details on Azure website?

You have two options: First, you can turn ...READ MORE

answered May 25, 2018 in Azure by club_seesharp
• 3,450 points
2,654 views
0 votes
1 answer

How to add an App Settings to existing Azure Web Application using Azure Power Shell?

The example is for slot-specific settings, if ...READ MORE

answered Jun 13, 2018 in Azure by club_seesharp
• 3,450 points
1,441 views
0 votes
1 answer

How to install Windows Azure Storage Emulator?

There may be an issue with the ...READ MORE

answered Mar 7, 2019 in Azure by Prerna
• 1,960 points
2,826 views
0 votes
1 answer

Friendly filename when downloading Azure blob.

Azure blobs can be downloaded in four ...READ MORE

answered Mar 16, 2019 in Azure by Prerna
• 1,960 points
3,802 views
0 votes
1 answer

How to debug Azure 500 internal server error?

You can simply turn off custom error in ...READ MORE

answered Mar 29, 2019 in Azure by Prerna
• 1,960 points
4,864 views
0 votes
1 answer

Trying to understand Load Balancing in Azure.

For your clarification - Azure DOES support load balancing in ...READ MORE

answered Mar 29, 2019 in Azure by Prerna
• 1,960 points
621 views
0 votes
1 answer

Error in CGI application - process terminated.

To fix this error, you need to deploy to ...READ MORE

answered Apr 9, 2019 in Azure by Prerna
• 1,960 points
2,724 views
0 votes
1 answer

Azure Storage Emulator shows error.

Check if you are running BitTorrent/uTorrent or similar ...READ MORE

answered Mar 16, 2019 in Azure by Prerna
• 1,960 points
1,737 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP