Skip to content

Commit 9194272

Browse files
authored
Merge pull request #7953 from MicrosoftDocs/main
Auto push to live 2024-12-31 02:00:02
2 parents 239b867 + d2725ff commit 9194272

12 files changed

Lines changed: 66 additions & 298 deletions

.openpublishing.redirection.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12595,6 +12595,11 @@
1259512595
"redirect_url": "/previous-versions/troubleshoot/windows-server/delete-enterprise-windows-certificate-authority",
1259612596
"redirect_document_id": false
1259712597
},
12598+
{
12599+
"source_path": "support/dynamics-365/sales/exception-appears-server-side-sync.md",
12600+
"redirect_url": "/troubleshoot/power-platform/dataverse/email-exchange-synchronization/exception-appears-server-side-sync",
12601+
"redirect_document_id": true
12602+
},
1259812603
{
1259912604
"source_path": "support/dynamics-365/sales/error-when-signing-dynamics-365.md",
1260012605
"redirect_url": "/troubleshoot/power-platform/dataverse/email-exchange-synchronization/error-when-signing-dynamics-365",
@@ -12610,6 +12615,31 @@
1261012615
"redirect_url": "/previous-versions/troubleshoot/content-retirement",
1261112616
"redirect_document_id": false
1261212617
},
12618+
{
12619+
"source_path": "support/dynamics-365/sales/unknownincomingemailintegrationerror.md",
12620+
"redirect_url": "/troubleshoot/power-platform/dataverse/email-exchange-synchronization/exception-appears-server-side-sync",
12621+
"redirect_document_id": false
12622+
},
12623+
{
12624+
"source_path": "support/dynamics-365/sales/unknownincomingemailintegrationerror-2147167669-shows-in-alert-in-mailbox.md",
12625+
"redirect_url": "/troubleshoot/power-platform/dataverse/email-exchange-synchronization/exception-appears-server-side-sync",
12626+
"redirect_document_id": false
12627+
},
12628+
{
12629+
"source_path": "support/dynamics-365/sales/unknownincomingemailintegrationerror-2147220192.md",
12630+
"redirect_url": "/troubleshoot/power-platform/dataverse/email-exchange-synchronization/exception-appears-server-side-sync",
12631+
"redirect_document_id": false
12632+
},
12633+
{
12634+
"source_path": "support/dynamics-365/sales/unknownincomingemailintegrationerror-2147220970-exception.md",
12635+
"redirect_url": "/troubleshoot/power-platform/dataverse/email-exchange-synchronization/exception-appears-server-side-sync",
12636+
"redirect_document_id": false
12637+
},
12638+
{
12639+
"source_path": "support/dynamics-365/sales/alert-appears-users-dynamics-365-mailbox-record.md",
12640+
"redirect_url": "/troubleshoot/power-platform/dataverse/email-exchange-synchronization/exception-appears-server-side-sync",
12641+
"redirect_document_id": false
12642+
},
1261312643
{
1261412644
"source_path": "support/windows-server/group-policy/apply-group-policy-objects-terminal-services.md",
1261512645
"redirect_url": "/troubleshoot/windows-server/group-policy/apply-group-policy-objects-rds",
Lines changed: 9 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
---
22
title: Troubleshoot HTTP 502.2 Bad Gateway error in CGI applications
33
description: Describes HTTP 502.2 Bad Gateway error in CGI applications and provides troubleshooting steps to resolve this issue.
4-
ms.date: 04/09/2012
4+
ms.date: 12/31/2024
55
ms.author: haiyingyu
66
author: HaiyingYu
77
ms.reviewer: johnhart
88
ms.custom: sap:Site Behavior and Performance\Runtime errors and exceptions, including HTTP 400 and 50x errors
99
---
1010
# Troubleshoot HTTP 502.2 Bad Gateway error in CGI applications
1111

12-
_Applies to:_   Internet Information Services 6.0, Internet Information Services 7.0
12+
_Applies to:_   Internet Information Services
1313

1414
This article describes HTTP 502.2 Bad Gateway error in Common Gateway Interface (CGI) applications and provides troubleshooting steps to resolve this issue.
1515

1616
## Symptom
1717

18-
You have a Web site that is hosted on Internet Information Services (IIS) 7.0. When you visit the Web site in a Web browser, you may receive an error message that resembles the following:
18+
You have a Web site that is hosted on Internet Information Services (IIS). When you visit the Web site in a Web browser, you might receive an error message that resembles the following one:
1919

2020
> Server Error in Application \<application name\>
2121
> HTTP Error 502.2 - Bad Gateway
@@ -24,13 +24,12 @@ You have a Web site that is hosted on Internet Information Services (IIS) 7.0. W
2424
2525
## Cause
2626

27-
This problem occurs because the CGI process terminates unexpectedly before the CGI process sends a response back to IIS 7.0.
27+
This problem occurs because the CGI process terminates unexpectedly before the CGI process sends a response back to IIS.
2828

2929
## Tools
3030

31-
- Tracing module on IIS 7.X
32-
- [Enterprise Tracing for Windows (ETW Tracing)](/windows-hardware/drivers/devtest/event-tracing-for-windows--etw-) on IIS 6.0
33-
- [Microsoft Network Monitor 3.4](https://www.microsoft.com/download/4865)
31+
- Tracing module on IIS
32+
- [Microsoft Network Monitor 3.4](https://www.microsoft.com/en-us/download/details.aspx?id=4865)
3433

3534
## Troubleshooting steps
3635

@@ -50,7 +49,7 @@ HTTP: Content-Type =text/html
5049
HTTP: Server =Microsoft-IIS/6.0
5150
HTTP: Date =Tue, 23 Aug 2005 20:25:47 GMT
5251
HTTP: Data: Number of data bytes remaining = 232 (0x00E8)
53-
00000: 00 11 BC 3E 62 3C 00 0F 1F 6C 1F E1 08 00 45 00 ..¼>b<...l.á..E.
52+
00000: 00 11 BC 3E 62 3C 00 0F 1F 6C 1F E1 08 00 45 00 ..%>b<...l.á..E.
5453
00010: 01 9A EF 40 40 00 80 06 00 00 D8 A2 10 5C 0A C8 .šï@@.&euro;...Ø¢.\.È
5554
00020: 04 15 00 50 55 B1 AA C6 89 52 E7 D6 85 01 50 18 ...PU±ªÆ‰RçÖ….P.
5655
00030: 09 2F F9 67 00 00 48 54 54 50 2F 31 2E 31 20 35 ./ùg..HTTP/1.1 5
@@ -81,69 +80,6 @@ HTTP: Data: Number of data bytes remaining = 232 (0x00E8)
8180

8281
Capture [FREB](troubleshoot-php-with-failed-request-tracing.md) log for the HTTP error message and locate which module is throwing this error message.
8382

84-
Troubleshoot the CGI process executable file to determine why the CGI process terminates unexpectedly. You may have to generate a memory dump file of the CGI process when the access violation occurs.
85-
86-
This problem occurs when the CGI application does exactly what the error suggests: inserts invalid data into the HTTP Header value(s) that is sends to IIS as part of its response. In IIS 6 with Windows 2003 SP1 installed, you can use ETW Tracing to see what the CGI is returning.
87-
88-
### Capture a Trace file using ETW Tracing
89-
90-
1. Copy the ETWSetup.zip file to the IIS6 Server.
91-
1. Extract it on the server.
92-
1. Open the folder from the command prompt.
93-
1. Enter _iis6trace-start.cmd_ to start the tracing.
94-
1. Reproduce the issue.
95-
1. Enter _iis6trace-stop.cmd_ to stop the tracing.
96-
1. At this point, you should have an _iistrace\_etl.etl_ file in that folder.
97-
1. Zip up that file and send it to Microsoft Support Engineer.
98-
1. Support engineer can help you convert ETL file into XML.
99-
1. Here is an example trace file from this sort of CGI problem:
100-
101-
The request to the CGI starts at line 391:
102-
103-
```xml
104-
<ROW>
105-
<EventNumber>391</EventNumber>
106-
<EventName>IISGeneral</EventName>
107-
<EventTypeName>GENERAL_REQUEST_START</EventTypeName>
108-
<Timestamp>2005-08-23 20:19:06</Timestamp>
109-
<UserData>ContextId={00000000-0000-0000-4c06-0060000000ef}|SiteId=1|AppPoolId=DefaultAppPool|ConnId=-1224979097571031481|RawConnId=0|RequestURL=http://siteaddress:80/cgi-bin/htmlos.exe/00182.3.055317239900014075|RequestVerb=POST</UserData>
110-
</ROW>
111-
```
112-
113-
The request is processed by IIS, you see it's for a CGI, and it's passed along to the CGI. The CGI starts its processing at line 405:
114-
115-
```xml
116-
<ROW>
117-
<EventNumber>405</EventNumber>
118-
<EventName>IISCGI</EventName>
119-
<EventTypeName>CGI_LAUNCH</EventTypeName>
120-
<Timestamp>2005-08-23 20:19:07</Timestamp>
121-
<UserData>ContextId={00000000-0000-0000-4c06-0060000000ef}|CommandLine="D:\Inetpub\cgi-bin\htmlos.exe" |ErrorCode=0x00000000|ProcessId=3136</UserData>
122-
</ROW>
123-
```
124-
125-
Line 441 shows the problem in the CGI:
83+
Troubleshoot the CGI process executable file to determine why the CGI process terminates unexpectedly. You might have to generate a memory dump file of the CGI process when the access violation occurs.
12684

127-
```xml
128-
<ROW>
129-
<EventNumber>441</EventNumber>
130-
<EventName>IISCGI</EventName>
131-
<EventTypeName>CGI_PREMATURE_TERMINATION</EventTypeName>
132-
<Timestamp>2005-08-23 20:25:47</Timestamp>
133-
<UserData>ContextId={00000000-0000-0000-4c06-0060000000ef}|Headers=</UserData>
134-
</ROW>
135-
```
136-
137-
For some reasons, the CGI application is ended prematurely. Notice the value of the headers entry. It's empty. This is why the error is sent to the client that the CGI is sending a bad set of headers. It is in fact sending an empty list of headers.
138-
139-
Line 446 shows the 502 that is sent to the client. It's actually a 502.2 (substatus of 2):
140-
141-
```xml
142-
<ROW>
143-
<EventNumber>446</EventNumber>
144-
<EventName>IISGeneral</EventName>
145-
<EventTypeName>GENERAL_REQUEST_END</EventTypeName>
146-
<Timestamp>2005-08-23 20:25:47</Timestamp>
147-
<UserData>ContextId={00000000-0000-0000-4c06-0060000000ef}|BytesSent=370|BytesReceived=105906875|HttpStatus=502|HttpSubStatus=2</UserData>
148-
</ROW>
149-
```
85+
This problem occurs when the CGI application does exactly what the error suggests, inserting invalid data into the HTTP header values that are sent to IIS as part of its response.

support/dynamics-365/sales/alert-appears-users-dynamics-365-mailbox-record.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

support/dynamics-365/sales/exception-appears-server-side-sync.md

Lines changed: 0 additions & 56 deletions
This file was deleted.

support/dynamics-365/sales/toc.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@
156156
href: dynamics-crm-installations-updates-and-documentation.md
157157
- name: Email and Office Integration
158158
items:
159-
- name: Alert appears in the user's mailbox record
160-
href: alert-appears-users-dynamics-365-mailbox-record.md
161159
- name: App for Outlook didn't load completely
162160
href: dynamics-365-app-outlook-did-not-load.md
163161
- name: App for Outlook is missing
@@ -190,16 +188,6 @@
190188
href: error-when-using-365-app-outlook.md
191189
- name: The view is not available when opening an email
192190
href: the-view-is-not-available-error-when-opening-emails.md
193-
- name: UnknownIncomingEmailIntegrationError -2147167669
194-
href: unknownincomingemailintegrationerror-2147167669-shows-in-alert-in-mailbox.md
195-
- name: UnknownIncomingEmailIntegrationError -2147220192
196-
href: unknownincomingemailintegrationerror-2147220192.md
197-
- name: UnknownIncomingEmailIntegrationError -2147220956
198-
href: exception-appears-server-side-sync.md
199-
- name: UnknownIncomingEmailIntegrationError -2147220970
200-
href: unknownincomingemailintegrationerror-2147220970-exception.md
201-
- name: UnknownIncomingEmailIntegrationError in Dynamics 365 mailbox
202-
href: unknownincomingemailintegrationerror.md
203191
- name: We're unable to connect to your server
204192
href: we-are-unable-to-connect-to-your-dynamics-365-app-for-outlook-error.md
205193
- name: You don't have permission to access this app

support/dynamics-365/sales/unknownincomingemailintegrationerror-2147167669-shows-in-alert-in-mailbox.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

support/dynamics-365/sales/unknownincomingemailintegrationerror-2147220192.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)