Use Failed Request Tracing Rules to Troubleshoot ARR
Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista
This topic describes how to configure and use failed request tracing rules to troubleshoot and debug Application Request Routing (ARR). You can also use failed request tracing rules to understand how routing decisions are made when selecting a destination server for a specific request. For more information about failed request tracing rules, see Troubleshooting Failed Requests Using Tracing in IIS 7.
To configure and use failed request tracing rules, you must have IIS 7 installed on a computer that is running Windows Server® 2008 or a more recent operating system; the Tracing role service must be installed for IIS 7, ARR and its dependent modules, and you must have a minimum of two application servers that have working sites and applications.
To configure and use failed request tracing rules, you must follow these steps:
Configure failed request tracing rules.
Analyze failed request tracing logs.
Configure Failed Request Tracing Rules
You can configure failed request tracing rules by using the UI or by using the command line.
To configure failed request tracing rules by using the UI
Open IIS Manager.
In the Connections pane, expand the server node, and then expand the Sites node.
Under the Sites node, select the Default Web Site or any site on which you want to configure failed request tracing rules.
In the Actions pane, click Failed Request Tracing….
In the Edit Web Site Failed Request Tracing Settings dialog box, select the Enable check box. Click OK.
In the Connections pane, select the Default Web Site.
In the Default Web Site pane, double-click Failed Request Tracing Rules.
In the Actions pane, click Add….
In the Add Failed Request Tracing Rule dialog box, on the Specify Content to Trace page, select the type of content that you want to trace:
All content (*)
On the Define Trace Conditions page, select the condition that you want to use to trace requests and enter an appropriate value:
Time taken (in seconds)
On the Select Trace Providers page, in the Providers list, clear the following check boxes: ASP, ASPNET, and ISAPI Extension.
In the Providers list, select WWW Server.
In the Areas list, select the following check boxes: Rewrite and RequestRouting. Make sure that the remaining check boxes are cleared, and then click Finish.
To configure failed request tracing rules by using the command line
Open a command prompt with administrator user rights, and navigate to %windir%\system32\inetsrv.
To enable failed request tracing on the Default Web Site, enter the following command:
appcmd set site “Default Web Site” –traceFailedRequestsLogging.enabled:”true” /commit:apphost
To configure the failed request tracing rules that you configured by using the UI procedure, enter the following commands:
appcmd.exe set config “Default Web Site” –section:system.webServer/tracing/traceFailedRequests /+”[path=’*’]”
where * is the type of content that you want to trace.
appcmd.exe set config “Default Web Site” –section:system.webServer/tracing/traceFailedRequests /[path=’*’].failureDefinitions.traceCondition:”value”
where * is the type of content that you want to trace, traceCondition is the trace condition that you want to use to trace requests, and value is the appropriate value for that trace condition.
appcmd.exe set config “Default Web Site” –section:system.webServer/tracing/traceFailedRequests /+”[path=’*’].traceAreas.[provider=’provider’,areas=’area’,verbosity=’Verbose’]”
where * is the type of content that you want to trace, provider is the type(s) of provider that you want to use, and area is the area(s) that you want to focus.
Analyze Failed Request Tracing Logs
By default, failed request tracing logs are located in the %SystemDrive%\inetpub\Logs\FailedReqLogFiles\ directory. You can view the following detailed information in the tracing log files in this directory:
Headers shows the HTTP header that ARR has received.
WebFarm indicates the name of the server group to where the request is routed.
Server indicates the destination server to where the request is routed.
Algorithm indicates which load balance algorithm is used.
RoutingReason explains the decision behind why the server is selected.
State is the availability of the destination server.
TotalRequests is the runtime statistic that shows how many requests have been sent to the server.
CurrentRequests is the runtime statistic that shows the concurrent number of HTTP requests to the server.
BytesSent is the runtime statistic that shows how much data (in KB) has been sent to the server.
BytesReceived is the runtime statistic that shows how much data (in KB) has been received from the server.
ResponseTime is the runtime statistic that shows the response time (in ms) of the server.
Headers shows the response HTTP header from the destination server.
Buffer shows the response entity from the destination server.
ARR_REQUEST_HEADERS_START, ARR_REQUEST_HEADERS_END, ARR_RESPONSE_HEADERS_START, ARR_RESPONSE_HEADERS_END, ARR_REQUEST_ENTITY_START, ARR_REQUEST_ENTITY_END, ARR_RESPONSE_ENTITY_START, ARR_RESPONSE_ENTITY_END
To profile the performance of ARR, these sections include timestamps to indicate the start and end times of corresponding events.