Application gateway is in a failed state.

While trying some different routing rules on our test cluster (thankfully!).... the portal bites me in the backside once again!

Never an error you want to see! If you're here, I suspect your day is going as well as mine did.

While trying some different routing rules on our test cluster (thankfully!) I noticed the new "Override backend path" setting, which may have been used on a new site. After trying the setting out, I decided it didn't fully work how I wanted and so decided to remove the setting in the portal.... Big mistake!

Almost immediately I got the intial notice.

2018-05-31-16_56_07-gatewaySaveFail

Followed by Application gateway is in a failed state. appearing at the top of each blade in the portal. After mucking around for a bit, I decided to log a support ticket.

https://resources.azure.com to the rescue!

It turns out once again, the fix for a problem with the portal was to directly edit the ARM resource!

The problem was, that the portal does not correctly set the path value back to null when you try to remove it, instead it uses an empty string! Support reminded me that resources.azure.com existed, and so off I went to fix the gateway.

resourceList

Once at the resource, select Edit from the top.

2018-05-31-17_27_35-Resource-Explorer

Identified the backendHttpSetting that had the invalid value.

2018-05-31-17_31_13-editArmResource_problem

Replace the invalid empty string, with the correct null value.

2018-05-31-17_32_00-editArmResource_solution

Then simply hit the Put button at the top of the page, which remove the errors and returned the gateway to its normal state, Few!

While this issue was specifically caused by an error setting a backendHttpSetting, its not the first time I've had this issue using the portal with App gateway. Hopefully by writing it up this time, I will remember the next time around (or maybe stick to my own advice and only use PowerShell) and possibly save someone else a day.