You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/application-gateway/http-response-codes.md
+28-17Lines changed: 28 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ services: application-gateway
5
5
author: greg-lindsay
6
6
ms.service: azure-application-gateway
7
7
ms.topic: troubleshooting
8
-
ms.date: 07/05/2023
8
+
ms.date: 03/28/2025
9
9
ms.author: greglin
10
10
---
11
11
@@ -36,9 +36,9 @@ HTTP 307 responses are presented when a redirection rule is specified with the *
36
36
37
37
## 4XX response codes (client error)
38
38
39
-
400-499 response codes indicate an issue that is initiated from the client. These issues can range from the client initiating requests to an unmatched hostname, request timeout, unauthenticated request, malicious request, and more.
39
+
400-499 response codes indicate an issue that is initiated from the client. These issues can range from the client initiating requests to an unmatched hostname, request time-out, unauthenticated request, malicious request, and more.
40
40
41
-
Application Gateway collects metrics that capture the distribution of 4xx/5xx status codes has a logging mechanism that captures information such as the URI client IP address with the response code. Metrics and logging enable further troubleshooting. Clients can also receive 4xx response from other proxies between the client device and Application Gateway. For example, CDN and other authentication providers. See the following articles for more information.
41
+
Application Gateway collects metrics that capture the distribution of 4xx/5xx status codes has a logging mechanism that captures information such as the URI client IP address with the response code. Metrics and logging enable further troubleshooting. Clients can also receive 4xx response from other proxies between the client device and Application Gateway. For example, CDN (Content Delivery Network) and other authentication providers. See the following articles for more information.
42
42
43
43
[Metrics supported by Application Gateway V2 SKU](application-gateway-metrics.md#metrics-supported-by-application-gateway-v2-sku)
@@ -66,13 +66,13 @@ Some common reasons for the request to be non-compliant to RFC are:
66
66
| Invalid value in Content-Length | Content-Length: **abc**,Content-Length: **-10**|
67
67
68
68
For cases when mutual authentication is configured, several scenarios can lead to an HTTP 400 response being returned the client, such as:
69
-
-Client certificate isn't presented, but mutual authentication is enabled.
70
-
- DN validation is enabled and the DN of the client certificate doesn't match the DN of the specified certificate chain.
69
+
-Mutual authentication is enabled but the Client certificate wasn't presented.
70
+
- DN (Distinguished Name) validation is enabled and the DN of the client certificate doesn't match the DN of the specified certificate chain.
71
71
- Client certificate chain doesn't match certificate chain configured in the defined SSL Policy.
72
72
- Client certificate is expired.
73
-
- OCSP Client Revocation check is enabled and the certificate is revoked.
74
-
- OCSP Client Revocation check is enabled, but unable to be contacted.
75
-
- OCSP Client Revocation check is enabled, but OCSP responder isn't provided in the certificate.
73
+
- OCSP (Online Certificate Status Protocol) Client Revocation check is enabled and the certificate is revoked.
74
+
- OCSP (Online Certificate Status Protocol) Client Revocation check is enabled, but unable to be contacted.
75
+
- OCSP (Online Certificate Status Protocol) Client Revocation check is enabled, but OCSP responder isn't provided in the certificate.
76
76
77
77
For more information about troubleshooting mutual authentication, see [Error code troubleshooting](mutual-authentication-troubleshooting.md#solution-2).
78
78
@@ -89,7 +89,7 @@ An HTTP 401 unauthorized response can be returned to AppGW probe request if the
89
89
90
90
#### 403 – Forbidden
91
91
92
-
HTTP 403 Forbidden is presented when customers are utilizing WAF skus and have WAF configured in Prevention mode. If enabled WAF rulesets or custom deny WAF rules match the characteristics of an inbound request, the client is presented a 403 forbidden response.
92
+
HTTP 403 Forbidden is presented when customers are utilizing WAF (Web Application Firewall) skus and have WAF configured in Prevention mode. If enabled WAF rulesets or custom deny WAF rules match the characteristics of an inbound request, the client is presented a 403 forbidden response.
93
93
94
94
Other reasons for clients receiving 403 responses include:
95
95
- You're using App Service as backend and it's configured to allow access only from Application Gateway. This can return a 403 error by App Services. This typically happens due to redirects/href links that point directly to App Services instead of pointing at the Application Gateway's IP address.
@@ -102,7 +102,7 @@ An HTTP 404 response can be returned if a request is sent to an application gate
102
102
- Without a hostname match defined in any [multi-site listeners](multiple-site-overview.md).
103
103
- Not configured with a [basic listener](application-gateway-components.md#types-of-listeners).
104
104
105
-
#### 408 – Request Timeout
105
+
#### 408 – Request Time-out
106
106
107
107
An HTTP 408 response can be observed when client requests to the frontend listener of application gateway don't respond back within 60 seconds. This error can be observed due to traffic congestion between on-premises networks and Azure, when virtual appliance inspects the traffic, or the client itself becomes overwhelmed.
108
108
@@ -112,7 +112,7 @@ An HTTP 413 response can be observed when using [Azure Web Application Firewall
112
112
113
113
#### 499 – Client closed the connection
114
114
115
-
An HTTP 499 response is presented if a client request that is sent to application gateways using v2 sku is closed before the server finished responding. This error can be observed in 2 scenarios. The first scenario is when a large response is returned to the client and the client might have closed or refreshed the application before the server finished sending a large response. The second scenario is when the timeout on the client side is low and doesn't wait long enough to receive the response from server. In this case it's better to increase the timeout on the client. In application gateways using v1 sku, an HTTP 0 response code may be raised for the client closing the connection before the server has finished responding as well.
115
+
An HTTP 499 response is presented if a client request that is sent to application gateways using v2 sku is closed before the server finished responding. This error can be observed in 2 scenarios. The first scenario is when a large response is returned to the client and the client might have closed or refreshed the application before the server finished sending a large response. The second scenario is when the time-out on the client side is low and doesn't wait long enough to receive the response from server. In this case it's better to increase the time-out on the client. In application gateways using v1 sku, an HTTP 0 response code may be raised for the client closing the connection before the server has finished responding as well.
116
116
117
117
118
118
## 5XX response codes (server error)
@@ -126,7 +126,7 @@ Azure Application Gateway shouldn't exhibit 500 response codes. Open a support r
126
126
#### 502 – Bad Gateway
127
127
128
128
HTTP 502 errors can have several root causes, for example:
129
-
- NSG, UDR, or custom DNS is blocking access to backend pool members.
129
+
- NSG (Network security group), UDR (user-defined route), or custom DNS is blocking access to backend pool members.
130
130
- Backend VMs or instances of [virtual machine scale sets](/azure/virtual-machine-scale-sets/overview) aren't responding to the default health probe.
131
131
- Invalid or improper configuration of custom health probes.
132
132
- Azure Application Gateway's [backend pool isn't configured or empty](application-gateway-troubleshooting-502.md#empty-backendaddresspool).
@@ -135,17 +135,28 @@ HTTP 502 errors can have several root causes, for example:
135
135
136
136
For information about scenarios where 502 errors occur, and how to troubleshoot them, see [Troubleshoot Bad Gateway errors](application-gateway-troubleshooting-502.md).
137
137
138
-
#### 504 – Gateway timeout
138
+
#### 504 – Gateway time-out
139
139
140
140
Azure application Gateway V2 SKU sent HTTP 504 errors if the backend response time exceeds the time-out value that is configured in the Backend Setting.
141
141
142
-
IIS
142
+
IIS (Internet Information Services web server)
143
143
144
-
If your backend server is IIS, see [Default Limits for Web Sites](/iis/configuration/system.applicationhost/sites/sitedefaults/limits#configuration) to set the timeout value. Refer to the `connectionTimeout` attribute for details. Ensure the connection timeout in IIS matches or does not exceed the timeout set in the backend setting.
144
+
If your backend server is IIS, see [Default Limits for Web Sites](/iis/configuration/system.applicationhost/sites/sitedefaults/limits#configuration) to set the time-out value. Refer to the `connectionTimeout` attribute for details. Ensure the connection time-out in IIS matches or does not exceed the timeout set in the backend setting.
145
145
146
-
nginx
146
+
Nginx
147
+
148
+
If the backend server is Nginx or Nginx Ingress Controller, and if it has upstream servers, ensure the value of `nginx:proxy_read_timeout` matches or does not exceed with the time-out set in the backend setting.
149
+
150
+
## Troubleshooting Scenarios
151
+
152
+
### "ERRORINFO_INVALID_HEADER" error in Access logs
153
+
154
+
**Issue**: The [Access log](monitor-application-gateway-reference.md#access-log-category) displays an "ERRORINFO_INVALID_HEADER" error for a request, despite the backend response code (serverStatus) being 200. In other cases, the backend server could return 500.
155
+
156
+
**Cause**: The client sends a header containing CR LF characters.
157
+
158
+
**Solution**: Replace the CR LF characters with SP (whitespace) and resend the request to Application Gateway.
147
159
148
-
If the backend server is nginx or nginx ingress controller, and if it has upstream servers, ensure the value of `nginx:proxy_read_timeout` matches or does not exceed with the timeout set in the backend setting.
Copy file name to clipboardExpand all lines: articles/application-gateway/monitor-application-gateway-reference.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Monitoring data reference for Azure Application Gateway
3
3
description: This article contains important reference material you need when you monitor Azure Application Gateway.
4
-
ms.date: 10/15/2024
4
+
ms.date: 03/28/2025
5
5
ms.custom: horz-monitor
6
6
ms.topic: reference
7
7
author: greg-lindsay
@@ -336,6 +336,7 @@ If the application gateway can't complete the request, it stores one of the foll
336
336
| ERRORINFO_UPSTREAM_NO_LIVE | The application gateway is unable to find any active or reachable backend servers to handle incoming requests. |
337
337
| ERRORINFO_UPSTREAM_CLOSED_CONNECTION | The backend server closed the connection unexpectedly or before the request was fully processed. This condition could happen due to backend server reaching its limits, crashing etc. |
338
338
| ERRORINFO_UPSTREAM_TIMED_OUT | The established TCP connection with the server was closed as the connection took longer than the configured timeout value. |
339
+
| ERRORINFO_INVALID_HEADER | Application Gateway detected a partial invalid header and forwarded the remaining header to the backend, which responded with 500. Ensure the client's request header does not contain CR, LF, NULL, or similar characters. Replace such characters with SP (whitespace). |
0 commit comments