Skip to content

Commit 7e47348

Browse files
authored
Merge pull request #186027 from vhorne/ag-troubleshoot
Ag troubleshoot
2 parents 49c37bc + 17899a7 commit 7e47348

File tree

5 files changed

+12
-41
lines changed

5 files changed

+12
-41
lines changed

articles/application-gateway/how-to-troubleshoot-application-gateway-session-affinity-issues.md

Lines changed: 12 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ title: Troubleshoot session affinity issues
33
titleSuffix: Azure Application Gateway
44
description: This article provides information on how to troubleshoot session affinity issues in Azure Application Gateway
55
services: application-gateway
6-
author: KumudD
6+
author: vhorne
77
ms.service: application-gateway
88
ms.topic: troubleshooting
9-
ms.date: 11/14/2019
10-
ms.author: kumud
9+
ms.date: 01/24/2022
10+
ms.author: victorh
1111
---
1212

1313
# Troubleshoot Azure Application Gateway session affinity issues
@@ -44,9 +44,9 @@ Sometimes the session affinity issues might occur when you forget to enable “C
4444

4545
![Screenshot shows SETTINGS with H T T P settings selected.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-1.png)
4646

47-
4. Click **appGatewayBackendHttpSettings** on the right side to check whether you have selected **Enabled** for Cookie based affinity.
47+
4. Select the HTTP setting, and on the **Add HTTP setting** page, check if **Cookie based affinity** is enabled.
4848

49-
![Screenshot shows the gateway settings for an app gateway, inlcuidng whether Cookie based affinity is selected.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-2.jpg)
49+
![Screenshot shows the gateway settings for an app gateway, including whether Cookie based affinity is selected.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-2.png)
5050

5151

5252

@@ -105,53 +105,24 @@ You can collect additional logs and analyze them to troubleshoot the issues rela
105105

106106
To collect the Application Gateway logs, follow the instructions:
107107

108-
Enable logging through the Azure portal
108+
Enable logging using the Azure portal.
109109

110-
1. In the [Azure portal](https://portal.azure.com/), find your resource and then click **Diagnostic logs**.
110+
1. In the [Azure portal](https://portal.azure.com/), find your resource and then select **Diagnostic setting**.
111111

112-
For Application Gateway, three logs are available: Access log, Performance log, Firewall log
112+
For Application Gateway, three logs are available: Access log, Performance log, and Firewall log.
113113

114-
2. To start to collect data, click **Turn on diagnostics**.
114+
2. To start to collect data, select **Add diagnostic setting**.
115115

116-
![Screenshot shows an application gateway with Diagnostics logs selected.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-5.png)
116+
![Screenshot shows an application gateway with Diagnostics settings selected.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-5.png)
117117

118-
3. The **Diagnostics settings** blade provides the settings for the diagnostic logs. In this example, Log Analytics stores the logs. Click **Configure** under **Log Analytics** to set your workspace. You can also use event hubs and a storage account to save the diagnostic logs.
118+
3. The **Diagnostic setting** page provides the settings for the diagnostic logs. In this example, Log Analytics stores the logs. You can also use event hubs and a storage account to save the diagnostic logs.
119119

120120
![Screenshot shows the Diagnostics settings pane with Log Analytics Configure selected.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-6.png)
121121

122-
4. Confirm the settings and then click **Save**.
122+
4. Confirm the settings and then select **Save**.
123123

124-
![Screenshot shows the Diagnostics settings pane with Save selected.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-7.png)
125124

126-
#### View and analyze the Application Gateway access logs
127125

128-
1. In the Azure portal under the Application Gateway resource view, select **Diagnostics logs** in the **MONITORING** section .
129-
130-
![Screenshot shows MONITORING with Diagnostics logs selected.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-8.png)
131-
132-
2. On the right side, select “**ApplicationGatewayAccessLog**“ in the drop-down list under **Log categories.**
133-
134-
![Screenshot shows the Log categories dropdown list with ApplicationGatewayAccessLog selected.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-9.png)
135-
136-
3. In the Application Gateway Access Log list, click the log you want to analyze and export, and then export the JSON file.
137-
138-
4. Convert the JSON file that you exported in step 3 to CSV file and view them in Excel, Power BI, or any other data-visualization tool.
139-
140-
5. Check the following data:
141-
142-
- **ClientIP**– This is the client IP address from the connecting client.
143-
- **ClientPort** - This is the source port from the connecting client for the request.
144-
- **RequestQuery** – This indicates the destination server that the request is received.
145-
- **Server-Routed**: Back-end pool instance that the request is received.
146-
- **X-AzureApplicationGateway-LOG-ID**: Correlation ID used for the request. It can be used to troubleshoot traffic issues on the back-end servers. For example: X-AzureApplicationGateway-CACHE-HIT=0&SERVER-ROUTED=10.0.2.4.
147-
148-
- **SERVER-STATUS**: HTTP response code that Application Gateway received from the back end.
149-
150-
![Screenshot shows server status in plain text, mostly obscured, with clientPort and SERVER-ROUTED highlighted.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-11.png)
151-
152-
If you see two items are coming from the same ClientIP and Client Port, and they are sent to the same back-end server, that means the Application Gateway configured correctly.
153-
154-
If you see two items are coming from the same ClientIP and Client Port, and they are sent to the different back-end servers, that means the request is bouncing between backend servers, select “**Application is using cookie-based affinity but requests still bouncing between back-end servers**” at the bottom to troubleshoot it.
155126

156127
### Use web debugger to capture and analyze the HTTP or HTTPS traffics
157128

Loading
Loading
Loading

0 commit comments

Comments
 (0)