Skip to content

Commit ca04857

Browse files
author
duongau
committed
relocate afd troubleshooting
1 parent fef36c1 commit ca04857

File tree

1 file changed

+105
-0
lines changed

1 file changed

+105
-0
lines changed
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
title: Troubleshoot Azure Front Door issues
3+
description: In this tutorial, you'll learn how to troubleshoot some of the common problems that you might face for your Azure Front Door instance.
4+
services: frontdoor
5+
author: duongau
6+
ms.service: frontdoor
7+
ms.topic: how-to
8+
ms.date: 11/12/2021
9+
ms.author: duau
10+
---
11+
12+
# Troubleshooting common issues with Azure Front Door
13+
14+
This article describes how to troubleshoot common routing problems that you might face for your Azure Front Door configuration.
15+
16+
## Additional debugging HTTP headers
17+
18+
You can request Front Door to return additional debugging HTTP response headers. For more details, refer to [optional response headers](front-door-http-headers-protocol.md#optional-debug-response-headers).
19+
20+
## 503 response from Azure Front Door after a few seconds
21+
22+
### Symptom
23+
24+
* Regular requests sent to your backend without going through Azure Front Door are succeeding. Going via Azure Front Door results in 503 error responses.
25+
* The failure from Azure Front Door typically shows after about 30 seconds.
26+
* Intermittent 503 errors with log `ErrorInfo: OriginInvalidResponse`.
27+
28+
### Cause
29+
30+
The cause of this problem can be one of three things:
31+
32+
* Your origin is taking longer than the timeout configured (default is 30 seconds) to receive the request from Azure Front Door.
33+
* The time it takes to send a response to the request from Azure Front Door is taking longer than the timeout value.
34+
* Client sent a byte range request with `Accept-Encoding header` (compression enabled).
35+
36+
### Troubleshooting steps
37+
38+
* Send the request to your backend directly (without going through Azure Front Door). See how long your backend usually takes to respond.
39+
* Send the request via Azure Front Door and see if you're getting any 503 responses. If not, the problem might not be a timeout issue. Contact support.
40+
* If requests going through Azure Front Door results in a 503 error response code, configure the **Origin response timeout (in seconds)** for the endpoint. You can extend the default timeout to up to 4 minutes (240 seconds). The setting can be configured by going to the *Endpoint manager* and selecting **Edit endpoint**.
41+
42+
:::image type="content" source=".\media\troubleshoot-route-issues\origin-response-timeout-1.png" alt-text="Screenshot of selecting edit endpoint from Endpoint manager.":::
43+
44+
Then select **Endpoint properties** to configure the **Origin response timeout**:
45+
46+
:::image type="content" source=".\media\troubleshoot-route-issues\origin-response-timeout-2.png" alt-text="Screenshot of select endpoint properties and Origin response timeout field." lightbox="..\media\troubleshoot-route-issues\origin-response-timeout-2-expanded.png":::
47+
48+
* If the timeout doesn’t resolve the issue, use a tool like Fiddler or your browser's developer tool to check if the client is sending byte range requests with Accept-Encoding headers, leading to the origin responding with different content lengths. If yes, then you can either disable compression on the Origin/Azure Front Door or create a Rules Set rule to remove `accept-encoding` from the request for byte range requests.
49+
50+
:::image type="content" source=".\media\troubleshoot-route-issues\remove-encoding-rule.png" alt-text="Screenshot of accept-encoding rule in a Rule Set.":::
51+
52+
## Requests sent to the custom domain return a 400 status code
53+
54+
### Symptom
55+
56+
* You created an Azure Front Door instance, but a request to the domain or frontend host is returning an HTTP 400 status code.
57+
* You created a DNS mapping for a custom domain to the frontend host that you configured. However, sending a request to the custom domain host name returns an HTTP 400 status code. It doesn't appear to route to the backend that you configured.
58+
59+
### Cause
60+
61+
The problem occurs if you didn't configure a routing rule for the custom domain that was added as the frontend host. A routing rule needs to be explicitly added for that frontend host. That's true even if a routing rule has already been configured for the frontend host under the Azure Front Door subdomain (*.azurefd.net).
62+
63+
### Troubleshooting steps
64+
65+
Add a routing rule for the custom domain to direct traffic to the selected origin group.
66+
67+
## Azure Front Door doesn't redirect HTTP to HTTPS
68+
69+
### Symptom
70+
71+
Azure Front Door has a routing rule that redirects HTTP to HTTPS, but accessing the domain still maintains HTTP as the protocol.
72+
73+
### Cause
74+
75+
This behavior can happen if you didn't configure the routing rules correctly for Azure Front Door. Basically, your current configuration isn't specific and might have conflicting rules.
76+
77+
### Troubleshooting steps
78+
79+
80+
## Request to the frontend host name returns a 411 status code
81+
82+
### Symptom
83+
84+
You created an Azure Front Door Standard/Premium instance and configured a frontend host, an origin group with at least one origin in it, and a routing rule that connects the frontend host to the origin group. Your content doesn't seem to be available when a request goes to the configured frontend host because an HTTP 411 status code gets returned.
85+
86+
Responses to these requests might also contain an HTML error page in the response body that includes an explanatory statement. For example: `HTTP Error 411. The request must be chunked or have a content length`.
87+
88+
### Cause
89+
90+
There are several possible causes for this symptom. The overall reason is that your HTTP request isn't fully RFC-compliant.
91+
92+
An example of noncompliance is a `POST` request sent without either a `Content-Length` or a `Transfer-Encoding` header (for example, using `curl -X POST https://example-front-door.domain.com`). This request doesn't meet the requirements set out in [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.3.2). Azure Front Door would block it with an HTTP 411 response.
93+
94+
This behavior is separate from the Web Application Firewall (WAF) functionality of Azure Front Door. Currently, there's no way to disable this behavior. All HTTP requests must meet the requirements, even if the WAF functionality isn't in use.
95+
96+
### Troubleshooting steps
97+
98+
- Verify that your requests are in compliance with the requirements set out in the necessary RFCs.
99+
100+
- Take note of any HTML message body that's returned in response to your request. A message body often explains exactly *how* your request is noncompliant.
101+
102+
## Next steps
103+
104+
* Learn how to [create a Front Door](quickstart-create-front-door.md).
105+
* Learn how to [create a Front Door Standard/Premium](standard-premium/create-front-door-portal.md).

0 commit comments

Comments
 (0)