53
IBM Software Group ® WebSphere ® Support Technical Exchange Demystifying the IBM® Web Server Plug-in Naveen Shetty AND Steve Reid IBM IHS / Plug-in Support Team

WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

Embed Size (px)

Citation preview

Page 1: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

®

WebSphere® Support Technical Exchange

Demystifying the IBM® Web Server Plug-in

Naveen Shetty AND Steve ReidIBM IHS / Plug-in Support Team

Page 2: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 2

Agenda

� Part 1 – Plug-in fundamentals and configuration

� Part 2 - Troubleshooting the Web Server Plug-in

� Questions and Answers

Page 3: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

®

WebSphere® Support Technical Exchange

Plug-in fundamentals and configuration

Naveen Shetty

[email protected]

Page 4: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 4

Agenda

� Introduction to WebSphere 6.1 Plug-in.

� Plug-in Operation

� Plug-in Configuration file

� Elements of Plugin-cfg.xml file

Page 5: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 5

Introduction to WebSphere Plug-in

� Plug-in is a glue between a Web Server and WebSphere Application Server

� Plug-in’s primary responsibility is to forward HTTP requests to the WebSphere Application Server

� The web server plug-in is developed native C language � The plug-in code varies slightly depending on the operating

system (OS) and the Web server being used although its operation and functionality remains the same.

� The plug-in code is in the form of a DLL library on Windows®, and SO library on Unix® (ie. AIX®, Solaris®, and so on).

� This library resides on the Web server machine and is loaded by the Web server startup process.

Page 6: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 6

Plug-in is an Agent:

� You can think of the WebSphere plug-in as an “agent”�using the HTTP protocol.�redirecting HTTP requests from the WebServer to the application server �As seen in Figure 1, an HTTP request from a Web browser enters the Web server and is then redirected to the application server.�This redirection is performed by the WebSphere plug-in.

Page 7: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 7

Plug-in Operation:� The plug-in “sends” HTTP requests, and acts as an HTTP

client.

� The application server receives those requests, and is therefore an HTTP Server.

� The component inside the application server which does the job of an HTTP Server is known as the HttpTransport.

� The HttpTransport of the appserver, listens on specific ports for HTTP (ie. 9080) and for HTTPS (ie. 9443).

� If there are multiple application server on the same node, they must be configured to use unique port numbers.

Page 8: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 8

Page 9: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 9

Some Plug-in related definitions.� httpd.conf: The default configuration file of the IBM HTTP

Server (IHS) Web server.� Plug-in: DLL residing on the same system as the Web server

is loaded into memory by the Web server during startup and runs inside the same process as the Web server.

� plugin-cfg.xml: This is the web server plug-in configuration file and contains information about which URLs should be serviced by WebSphere.

� HttpTransport: This component's job is to accept the HTTP request from the plug-in, and then forward it to the Web container.

� Web container: It is responsible for processing data inside the request and giving the response data back to the plug-in.

Page 10: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 10

Understanding the Plugin-cfg.xml file

� plugin-cfg.xml file is created by clicking the “Generate Plug-in” button on the web servers page of the WebSphere administrative console.

� Also GenPluginCfg.bat script can be used to “generate” a plug-in configuration file called plugin-cfg.xml

� The GenPluginCfg.bat picks information from AppServer Server configuration xml files to populate the plugin-cfg.xml file

� If the web server is on a different system than WebSphere Application Server, the plugin config (plugin-cfg.xml file) must be copied (propagated) from WAS to the web server system.

� The Plug-in configuration file is made of several areas called Elements

� Each Element contains specific configuration properties.

Page 11: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 11

Plugin-cfg.xml Elements

� Config Element

� Log Element

� Property Element

� VirtualHostGroup Element

� UriGroup Element

� Route Element

� ServerCluster Element

Page 12: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 12

Config, Log, Property, and VirtualHostGroup<?xml version="1.0" encoding="ISO-8859-1"?><!--HTTP server plugin config file for the webserver game1Cell01.GAME2Node01.IHS61

generated on 2008.11.11 at 05:40:33 PM MST--><Config ASDisableNagle="false" AcceptAllContent="false"

AppServerPortPreference="HostHeader" ChunkedResponse="false" FIPSEnable="false" IISDisableNagle="false" IISPluginPriority="High" IgnoreDNSFailures="false" RefreshInterval="60" ResponseChunkSize="64" VHostMatchingCompat="false">

<Log LogLevel="Trace" Name="C:\Program Files\IBM\HTTPServer\Plugins\logs\IHS61\http_plugin.log"/>

<Property Name="ESIEnable" Value="true"/><Property Name="ESIMaxCacheSize" Value="1024"/><Property Name="ESIInvalidationMonitor" Value="false"/><Property Name="ESIEnableToPassCookies" Value="false"/><VirtualHostGroup Name="server1_host">

<VirtualHost Name="*:9080"/><VirtualHost Name="*:9443"/><VirtualHost Name="server1:80"/><VirtualHost Name="server1:443"/>

</VirtualHostGroup><VirtualHostGroup Name="default_host">

<VirtualHost Name="*:80"/><VirtualHost Name="*:443"/><VirtualHost Name="*:9082"/><VirtualHost Name="*:9081"/><VirtualHost Name="*:9444"/><VirtualHost Name="*:9445"/>

</VirtualHostGroup>

Page 13: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 13

Config Element

<Config ASDisableNagle="false" AcceptAllContent="false" AppServerPortPreference="HostHeader" ChunkedResponse="false" FIPSEnable="false" IISDisableNagle="false" IISPluginPriority="High" IgnoreDNSFailures="false" RefreshInterval="60" ResponseChunkSize="64" VHostMatchingCompat="false">

Page 14: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 14

Log and Property Elements

� Log Element<Log LogLevel="Trace" Name="C:\Program

Files\IBM\HTTPServer\Plugins\logs\IHS61\http_plugin.log"/>

� Property Element<Property Name="ESIEnable" Value="true"/><Property Name="ESIMaxCacheSize" Value="1024"/><Property Name="ESIInvalidationMonitor" Value="false"/><Property Name="ESIEnableToPassCookies" Value="false"/>

Page 15: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 15

VirtualHostGroup Element

<VirtualHostGroup Name="server1_host"><VirtualHost Name="*:9080"/><VirtualHost Name="*:9443"/><VirtualHost Name="server1:80"/><VirtualHost Name="server1:443"/>

</VirtualHostGroup>

<VirtualHostGroup Name="default_host"><VirtualHost Name="*:80"/><VirtualHost Name="*:443"/><VirtualHost Name="*:9082"/><VirtualHost Name="*:9081"/><VirtualHost Name="*:9444"/><VirtualHost Name="*:9445"/>

</VirtualHostGroup>

Page 16: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 16

Plugin-cfg.xml: ServerCluster Element

<ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="true" LoadBalance="Round Robin" Name="server1_GAME2Node01_Cluster" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">

<Server ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="GAME2Node01_server1" ServerIOTimeout="0" WaitForContinue="false">

<Transport Hostname="GAME2" Port="9080" Protocol="http"/><Transport Hostname="GAME2" Port="9443" Protocol="https">

<Property Name="keyring" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.kdb"/>

<Property Name="stashfile" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.sth"/>

</Transport></Server>

</ServerCluster>

Page 17: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 17

Plugin-cfg.xml: ServerCluster Element (cont)<ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="true" LoadBalance="Round Robin" Name="cluster61"

PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60"><Server CloneID="12n750trp" ConnectTimeout="10" ExtendedHandshake="false" LoadBalanceWeight="19" MaxConnections="-1" Name="GAME2Node01_member1" ServerIOTimeout="60" WaitForContinue="false">

<Transport Hostname="GAME2" Port="9081" Protocol="http"/><Transport Hostname="GAME2" Port="9444" Protocol="https">

<Property Name="keyring" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.kdb"/><Property Name="stashfile" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.sth"/>

</Transport></Server><Server CloneID="12n750viu" ConnectTimeout="10" ExtendedHandshake="false" LoadBalanceWeight="19" MaxConnections="-1" Name="GAME3Node01_member2" ServerIOTimeout="60" WaitForContinue="false">

<Transport Hostname="GAME3" Port="9081" Protocol="http"/><Transport Hostname="GAME3" Port="9444" Protocol="https">

<Property Name="keyring" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.kdb"/><Property Name="stashfile" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.sth"/>

</Transport></Server>

<Server CloneID="12n7510r0" ConnectTimeout="10" ExtendedHandshake="false" LoadBalanceWeight="20" MaxConnections="-1" Name="GAME2Node01_member3" ServerIOTimeout="60" WaitForContinue="false">

<Transport Hostname="GAME2" Port="9082" Protocol="http"/><Transport Hostname="GAME2" Port="9445" Protocol="https">

<Property Name="keyring" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.kdb"/><Property Name="stashfile" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.sth"/>

</Transport></Server><Server CloneID="12n7511dh" ConnectTimeout="10" ExtendedHandshake="false" LoadBalanceWeight="20" MaxConnections="-1" Name="GAME3Node01_member4" ServerIOTimeout="60" WaitForContinue="false">

<Transport Hostname="GAME3" Port="9082" Protocol="http"/><Transport Hostname="GAME3" Port="9445" Protocol="https">

<Property Name="keyring" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.kdb"/><Property Name="stashfile" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.sth"/>

</Transport></Server><PrimaryServers>

<Server Name="GAME2Node01_member1"/><Server Name="GAME3Node01_member2"/><Server Name="GAME2Node01_member3"/><Server Name="GAME3Node01_member4"/>

</PrimaryServers></ServerCluster>

Page 18: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 18

UriGroup and Route<UriGroup Name="default_host_cluster61_URIs">

<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/snoop/*"/><Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/hello"/><Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/hitcount"/><Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="*.jsp"/><Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="*.jsv"/><Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="*.jsw"/><Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/j_security_check"/><Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/ibm_security_logout"/><Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/servlet/*"/><Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/DynWeb1/*"/><Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/helloWorld/*"/><Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/helloCountry/*"/><Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/helloState/*"/>

</UriGroup><Route ServerCluster="cluster61" UriGroup="default_host_cluster61_URIs"

VirtualHostGroup="default_host"/>

<UriGroup Name="server1_host_server1_GAME2Node01_Cluster_URIs"><Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/WebSphereTPHosts/*"/><Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/TestPublish/*"/><Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/UTC/*"/>

</UriGroup><Route ServerCluster="server1_GAME2Node01_Cluster"

UriGroup="server1_host_server1_GAME2Node01_Cluster_URIs" VirtualHostGroup="server1_host"/>

Page 19: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

®

WebSphere® Support Technical Exchange

Troubleshooting the web server plug-in

Steve Reid

[email protected]

Page 20: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 20

Agenda

� Plug-in MustGather documents

� Key elements of the Plug-in trace

� Walk through of a Plug-in trace

� Common Plug-in problems

� Plug-in fixpacks

Page 21: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 21

Plug-in MustGather documents

� If using IBM Http Server (IHS) with Plug-in, use: http://www.ibm.com/support/docview.wss?rs=177&uid=swg21141306

� If using any other web server with Plug-in, use: http://www.ibm.com/support/docview.wss?rs=177&uid=swg21174894

� IHS >>> LogLevel debug >>> httpd.conf

� Plug-in >>> LogLevel=“Trace” >>> plugin-cfg.xml

� WAS >>> use trace string shown in mustgather

Page 22: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 22

Files to get from the customer:

� From IBM Http Server (IHS):�httpd.conf

�error.log

�access.log

� From Plug-in:�plugin-cfg.xml

�http_plugin.log <<<< Plug-in trace file

� From WebSphere Application Server (WAS):�SystemOut.log

�Trace.log

Page 23: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 23

Plug-in Build Date

Plug-in Build Date can be used to determine what is the exact level of Plug-in the customer is using. In the http_plugin.log file you will see something like this:

PLUGIN: --------------------System Information-----------------------

PLUGIN: Bld version: 6.1.0

PLUGIN: Bld date: Aug 29 2007, 09:17:37

PLUGIN: Webserver: IBM_HTTP_Server

PLUGIN: Hostname = GAME2

PLUGIN: OS version 5.1, build 2600, 'Service Pack 2'

PLUGIN: --------------------------------------------------------------

Use this technote to match up the Bld date with the Plug-in level:

http://www.ibm.com/support/docview.wss?rs=180&uid=swg27013332

Bld date: Aug 29 2007 >>>>>>> means Plug-in level 6.1.0.11

Page 24: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 24

Multiple web server child processes

� On most platforms, the IHS web server can have more than one child process.

� IHS on Windows only has ONE child process.

� Each web server child process loads a separate “instance” of the Plug-in.

� All Plug-in instances write to the same log file.

Page 25: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 25

Configure IHS for only one (few) processes

� http://publib.boulder.ibm.com/httpserv/ihsdiag/ihs_performance.html#WebSpherePlugIn

� http://www.ibm.com/support/docview.wss?rs=177&uid=swg21167658

� In the httpd.conf file for IBM Http Server (IHS)

# 2-4 child processes # only 1 child process# 100 threads each # 400 threads<IfModule worker.c> <IfModule worker.c>ThreadLimit 100 ThreadLimit 400ServerLimit 4 ServerLimit 1StartServers 2 StartServers 1MaxClients 400 MaxClients 400MinSpareThreads 100 MinSpareThreads 400MaxSpareThreads 200 MaxSpareThreads 400ThreadsPerChild 100 ThreadsPerChild 400MaxRequestsPerChild 0 MaxRequestsPerChild 0</IfModule> </IfModule>

Page 26: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 26

Process id / Thread id in plug-in trace[Thu Oct 30 14:51:12 2008] 00000772 ee670ba0 - TRACE: ws_common: websphereShouldHandleRequest: No route found

[Thu Oct 30 14:51:12 2008] 00000772 ee670ba0 - TRACE: mod_was_ap20_http: as_fixups main request

[Thu Oct 30 14:51:12 2008] 00000772 ee670ba0 - TRACE: mod_was_ap20_http: as_handler: In the app server handler

[Thu Oct 30 14:51:12 2008] 00000772 ee670ba0 - TRACE: mod_was_ap20_http: in as_logger

[Thu Oct 30 14:51:12 2008] 00000756 f1e77ba0 - TRACE: HTTP/1.1 100 Continue

[Thu Oct 30 14:51:12 2008] 00000756 f1e77ba0 - TRACE: Content-Length: 0

[Thu Oct 30 14:51:12 2008] 00000756 f1e77ba0 - TRACE: Date: Thu, 30 Oct 2008 18:51:12 GMT

[Thu Oct 30 14:51:12 2008] 00000756 f1e77ba0 - TRACE: Server: WebSphere Application Server/6.0

[Thu Oct 30 14:51:12 2008] 00000756 f1e77ba0 - TRACE: lib_htrequest: htrequestWrite: Writing the request content

[Thu Oct 30 14:51:12 2008] 00000756 f1e77ba0 - TRACE: lib_htrequest: htrequestWrite: content length is 39

[Thu Oct 30 14:51:12 2008] 00000756 f1e77ba0 - TRACE: lib_htrequest: htrequestWrite: Allocating buffer of 39 for POST content

[Thu Oct 30 14:51:12 2008] 00000756 f1e77ba0 - TRACE: mod_was_ap20_http: cb_read_body: In the read body callback

[Thu Oct 30 14:51:12 2008] 00000756 f1e77ba0 - TRACE: mod_was_ap20_http: cb_read_body: Read from IHS client 39 -available 39

[Thu Oct 30 14:51:12 2008] 0000073a ec66cba0 - TRACE: lib_util: parseHostHeader: Defaulting port for scheme 'http‘

[Thu Oct 30 14:51:12 2008] 0000073a ec66cba0 - TRACE: lib_util: parseHostHeader: Host: 'www.philosophy.com', port 80

[Thu Oct 30 14:51:12 2008] 0000073a ec66cba0 - TRACE: ws_common: websphereCheckConfig: Current time is 1225392672, next stat time is 1225392720

[Thu Oct 30 14:51:12 2008] 0000073a ec66cba0 - TRACE: ws_common: websphereShouldHandleRequest: trying to match a route for: vhost='www.philosophy.com'; uri='/web/store/AjaxHeaderDisplay'

Page 27: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 27

Elements of a plug-in transaction� request received

� matching VirtualHostGroup

� matching UriGroup

� determining which ServerCluster

� determining which Server (load balance, fail-over, affinity)

� opening stream to the Server

� sending the request

� reading the response

� replying to client

Page 28: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 28

Request received

� Transaction begins with “parseHostHeader”

DEBUG: lib_util: parseHostHeader: Defaulting port for scheme 'http'DEBUG: lib_util: parseHostHeader: Host: 'game2', port 80DEBUG: ws_common: websphereCheckConfig: Current time is 1221083454, next stat

time is 1221083458DETAIL: ws_common: websphereShouldHandleRequest: trying to match a route for:

vhost='game2'; uri='/snoop'

Start of the transaction

Page 29: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 29

Matching VirtualHostGroup

TRACE: ws_common: websphereVhostMatch: Comparing 'server1:443' to 'game2:80' in VhostGroup: server1_host (case 2)TRACE: ws_common: websphereVhostMatch: Comparing 'server1:80' to 'game2:80' in VhostGroup: server1_host (case 2)TRACE: ws_common: websphereVhostMatch: Comparing '*:9443' to 'game2:80' in VhostGroup: server1_hostTRACE: ws_common: websphereVhostMatch: Comparing '*:9080' to 'game2:80' in VhostGroup: server1_hostTRACE: ws_common: websphereVhostMatch: Failed to match: game2:80DEBUG: ws_common: webspherePortNumberForMatching: Using logical.TRACE: ws_common: websphereVhostMatch: Comparing '*:9445' to 'game2:80' in VhostGroup: default_hostTRACE: ws_common: websphereVhostMatch: Comparing '*:9444' to 'game2:80' in VhostGroup: default_hostTRACE: ws_common: websphereVhostMatch: Comparing '*:9081' to 'game2:80' in VhostGroup: default_hostTRACE: ws_common: websphereVhostMatch: Comparing '*:9082' to 'game2:80' in VhostGroup: default_hostTRACE: ws_common: websphereVhostMatch: Comparing '*:443' to 'game2:80' in VhostGroup: default_hostTRACE: ws_common: websphereVhostMatch: Comparing '*:80' to 'game2:80' in VhostGroup: default_hostDEBUG: ws_common: websphereVhostMatch: Found a match '*:80' to 'game2:80' in VhostGroup: default_host with score 1,

exact match 0

Looking for a match in the server1_host VirtualHostGroup

Looking for a match in the default_host VirtualHostGroup

URL in browser was http://game2/snoop

So far, plug-in has matched this part.

Page 30: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 30

Matching UriGroup

DEBUG: ws_common: websphereUriMatch: Found a match '/snoop' to '/snoop' in UriGroup: default_host_cluster61_URIs with score 6, exact match 6

TRACE: ws_common: websphereUriMatch: uri length smaller than uri defs so skipping the rest

URL in browser was http://game2/snoop

Now, plug-in has matched this part, too.

Page 31: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 31

Determining which ServerCluster to use

Here is the route statement from the plugin-cfg.xml file:

<Route ServerCluster="cluster61" UriGroup="default_host_cluster61_URIs" VirtualHostGroup="default_host"/>

If the request matches both the UriGroup and the VirtualHostGroup,

then the route specifies which ServerCluster to use for the request.

TRACE: ws_common: websphereFindServerGroup: Setting the server group: cluster61; curScore of 7 greater than high of 0

DETAIL: ws_common: websphereFindServerGroup: Setting the server group: cluster61; highScore: 7; highExactMatch: 6; affinityCookie: JSESSIONID; affinityURL: jsessionid

Page 32: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 32

Determining which Server to use:(non-clustered)

<ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="true" LoadBalance="Round Robin" Name="server1_GAME2Node01_Cluster" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">

<Server ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="GAME2Node01_server1" ServerIOTimeout="0" WaitForContinue="false">

<Transport Hostname="GAME2" Port="9080" Protocol="http"/><Transport Hostname="GAME2" Port="9443" Protocol="https">

<Property Name="keyring" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.kdb"/>

<Property Name="stashfile" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.sth"/>

</Transport></Server>

</ServerCluster>

Page 33: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 33

Determining which Server to use: (clustered)<ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="true" LoadBalance="Round

Robin" Name="cluster61" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60"><Server CloneID="12n750trp" ConnectTimeout="10" ExtendedHandshake="false" LoadBalanceWeight=“19"

MaxConnections="-1" Name="GAME2Node01_member1" ServerIOTimeout="60" WaitForContinue="false"><Transport Hostname="GAME2" Port="9081" Protocol="http"/><Transport Hostname="GAME2" Port="9444" Protocol="https">

<Property Name="keyring" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.kdb"/><Property Name="stashfile" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.sth"/>

</Transport></Server><Server CloneID="12n750viu" ConnectTimeout="10" ExtendedHandshake="false" LoadBalanceWeight=“19"

MaxConnections="-1" Name="GAME3Node01_member2" ServerIOTimeout="60" WaitForContinue="false"><Transport Hostname="GAME3" Port="9081" Protocol="http"/><Transport Hostname="GAME3" Port="9444" Protocol="https">

<Property Name="keyring" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.kdb"/><Property Name="stashfile" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.sth"/>

</Transport></Server><Server CloneID="12n7510r0" ConnectTimeout="10" ExtendedHandshake="false" LoadBalanceWeight=“20"

MaxConnections="-1" Name="GAME2Node01_member3" ServerIOTimeout="60" WaitForContinue="false"><Transport Hostname="GAME2" Port="9082" Protocol="http"/><Transport Hostname="GAME2" Port="9445" Protocol="https">

<Property Name="keyring" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.kdb"/><Property Name="stashfile" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.sth"/>

</Transport></Server><Server CloneID="12n7511dh" ConnectTimeout="10" ExtendedHandshake="false" LoadBalanceWeight=“20"

MaxConnections="-1" Name="GAME3Node01_member4" ServerIOTimeout="60" WaitForContinue="false"><Transport Hostname="GAME3" Port="9082" Protocol="http"/><Transport Hostname="GAME3" Port="9445" Protocol="https">

<Property Name="keyring" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.kdb"/><Property Name="stashfile" Value="C:\Program Files\IBM\HTTPServer\Plugins\config\IHS61\plugin-key.sth"/>

</Transport></Server>

</ServerCluster>

Page 34: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 34

Is this an “affinity” request?

1) Check for SSLJSESSION cookie

2) Check for JSESSIONID cookie

3) Check for URL rewrite (jsessionid) in the URL

4) Check partitionID against partition table if any

Page 35: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 35

If JSESSIONID is present, get the cloneid

TRACE: ws_common: websphereHandleSessionAffinity: Checking for session affinityTRACE: ws_common: websphereHandleSessionAffinity: Checking the SSL cookie affinity: SSLJSESSIONTRACE: lib_htrequest: htrequestGetCookieValue: Looking for cookie: 'SSLJSESSION'TRACE: lib_htrequest: htrequestGetCookieValue: No cookie found for: 'SSLJSESSION'TRACE: ws_common: websphereHandleSessionAffinity: Checking the cookie affinity: JSESSIONIDTRACE: lib_htrequest: htrequestGetCookieValue: Looking for cookie: 'JSESSIONID'TRACE: lib_htrequest: htrequestGetCookieValue: name='JSESSIONID',

value='0000nFKj2sPjmtT6hh5QlWyQ1rU:12n7511dh'TRACE: ws_common: websphereHandleSessionAffinity: Checking the JSESSIONID in cookie:

0000nFKj2sPjmtT6hh5QlWyQ1rU:12n7511dhDEBUG: ws_common: websphereParseCloneID: Parsing clone ids from

'0000nFKj2sPjmtT6hh5QlWyQ1rU:12n7511dh'TRACE: ws_common: websphereParseCloneID: Adding clone id '12n7511dh'TRACE: ws_common: websphereParseCloneID: Returning list of clone idsTRACE: ws_server_group: serverGroupFindClone: Looking for cloneTRACE: ws_server_group: serverGroupGetFirstPrimaryServer: getting the first primary serverTRACE: ws_server_group: serverGroupFindClone: Comparing curCloneID '12n7511dh' to server clone id

'12n750trp'TRACE: ws_server_group: serverGroupGetNextPrimaryServer: getting the next primary serverTRACE: ws_server_group: serverGroupFindClone: Comparing curCloneID '12n7511dh' to server clone id

'12n750viu'TRACE: ws_server_group: serverGroupGetNextPrimaryServer: getting the next primary serverTRACE: ws_server_group: serverGroupFindClone: Comparing curCloneID '12n7511dh' to server clone id

'12n7510r0'TRACE: ws_server_group: serverGroupGetNextPrimaryServer: getting the next primary serverTRACE: ws_server_group: serverGroupFindClone: Comparing curCloneID '12n7511dh' to server clone id

'12n7511dh'TRACE: ws_server_group: serverGroupFindClone: Match for clone 'GAME3Node01_member4'

Page 36: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 36

If no match found, use Round Robin or RandomTRACE: ws_common: websphereHandleSessionAffinity: Checking for session affinityTRACE: ws_common: websphereHandleSessionAffinity: Checking the SSL cookie affinity:

SSLJSESSIONTRACE: lib_htrequest: htrequestGetCookieValue: Looking for cookie: 'SSLJSESSION'TRACE: lib_htrequest: htrequestGetCookieValue: No cookie found for: 'SSLJSESSION'TRACE: ws_common: websphereHandleSessionAffinity: Checking the cookie affinity:

JSESSIONIDTRACE: lib_htrequest: htrequestGetCookieValue: Looking for cookie: 'JSESSIONID'TRACE: lib_htrequest: htrequestGetCookieValue: No cookie found for: 'JSESSIONID'TRACE: ws_common: websphereHandleSessionAffinity: Checking the url rewrite affinity:

jsessionidTRACE: ws_common: websphereParseSessionID: Parsing session id from

'/helloWorld/world.jsp'TRACE: ws_common: websphereParseSessionID: No session found for jsessionidTRACE: ws_common: websphereHandleSessionAffinity: Bypassing check for partitionID

cookie affinity. No stored partition table.DEBUG: ws_server_group: serverGroupNextRoundRobinServer: Round Robin load balancing

Page 37: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 37

LoadBalance: Round Robin

� For the first request (after web server start-up), the server will be chosen randomly.

� After that, the plug-in will use the next server in the list and so on… (member1, member2, member3, member4)

� Each time a server is “picked”, the load balance weight is decremented by one.

� Any server with a weight below 0 will no longer be used for new requests. But, affinity requests will still go through.

Page 38: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 38

LoadBalance: Round Robin (cont)

� When all servers have a weight of less than 0, the plug-in will “reset” the weights to the starting values.

� By default affinity requests do NOT cause the plugin to decrement the weight of the server. This can lead to an uneven distribution when there are many affinity requests.

� To resolve the affinity problem use this option: IgnoreAffinityRequests="false"

Page 39: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 39

LoadBalance: Random

� For all non-affinity requests, the server is “picked” randomly.

� The affinity requests are sent to the matching clone id.

� LoadBalance “weight” is not used at all in the Random case.

Page 40: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 40

The trace shows which server was “picked”

[Wed Sep 10 17:26:29 2008] 00001f18 00000cb0 - TRACE: ws_server_group: lockedServerGroupUseServer: Server GAME3Node01_member4 picked, weight 6.

[Wed Sep 10 17:26:29 2008] 00001f18 00000cb0 - TRACE: ws_server_group: serverGroupIncrementConnectionCount: Server GAME3Node01_member4 picked, pendingConnectionCount 1 totalConnectionsCount 1.

[Wed Sep 10 17:26:29 2008] 00001f18 00000cb0 - DEBUG: ws_server_group: serverGroupNextRoundRobinServer: use server GAME3Node01_member4

� I like to search the trace file for the string “picked, weight” to quickly see which servers are being chosen in what order.

Page 41: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 41

Open a stream to the server:

DEBUG: ws_server_group: serverGroupNextRoundRobinServer: use server GAME3Node01_member4

TRACE: ws_common: websphereFindTransport: Finding the transportDETAIL: ws_common: websphereFindTransport: Setting the transport(case 2): GAME3

on port 9082TRACE: ws_common: websphereExecute: Executing the transaction with the app serverDEBUG: ws_common: websphereGetStream: Getting the stream to the app serverTRACE: ws_transport: transportStreamDequeue: Checking for existing stream from

the queueTRACE: ws_common: websphereGetStream: Have a connect timeout of 10; Setting

socket to not block for the connectTRACE: errno 0TRACE: RET 1TRACE: READ SET 0TRACE: WRITE SET 1TRACE: EXCEPT SET 0TRACE: ws_common: websphereGetStream: Reseting socket to blockTRACE: ws_common: websphereGetStream: setting the ServerIOTimeout for socket 600DEBUG: ws_common: websphereGetStream: socket 600 connected to GAME3:9082DEBUG: lib_stream: openStream: Opening the streamDETAIL: ws_common: websphereGetStream: Created a new stream; queue was empty,

socket = 600

Page 42: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 42

Write the request to the server:

DEBUG: lib_htrequest: htrequestWrite: Writing the request:DETAIL: GET /helloWorld/world.jsp HTTP/1.1DETAIL: Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*

DETAIL: Accept-Language: en-usDETAIL: Accept-Encoding: gzip, deflateDETAIL: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)

DETAIL: Host: game2DETAIL: $WSIS: falseDETAIL: $WSSC: httpDETAIL: $WSPR: HTTP/1.1DETAIL: $WSRA: 192.168.0.112DETAIL: $WSRH: 192.168.0.112DETAIL: $WSSN: game2DETAIL: $WSSP: 80DETAIL: Surrogate-Capability: WS-ESI="ESI/1.0+"DETAIL: _WS_HAPRT_WLMVERSION: -1TRACE: ws_common: websphereExecute: Wrote the request; reading the response

Page 43: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 43

Read response from the server:

DETAIL: lib_htresponse: htresponseRead: Reading the response: 5c984cDETAIL: HTTP/1.1 200 OKDETAIL: Content-Type: text/html; charset=ISO-8859-1DETAIL: Content-Language: en-USDETAIL: Content-Length: 261TRACE: lib_htresponse: htresponseSetContentLength: Setting the content length |261|

DETAIL: Set-Cookie: JSESSIONID=0000GytzwDUes2NUCISYUDJxUX3:12n7511dh; Path=/

DETAIL: Date: Wed, 10 Sep 2008 23:26:27 GMTDETAIL: Server: WebSphere Application Server/6.1DETAIL: Expires: Thu, 01 Dec 1994 16:00:00 GMTDETAIL: Cache-Control: no-cache="set-cookie, set-cookie2"TRACE: ws_common: websphereExecute: Read the response; breaking out of loop

TRACE: ws_common: websphereExecute: Done with Request to app serverprocessing

Server clone id is at the end of the JSESSIONID cookie in the response

Page 44: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 44

Send the response to the client (browser):TRACE: mod_was_ap20_http: cb_write_headers: In the write headers callbackTRACE: mod_was_ap20_http: cb_write_headers: Setting Content-type to text/html;

charset=ISO-8859-1TRACE: mod_was_ap20_http: cb_write_headers: Adding header Content-Length value

is 261TRACE: mod_was_ap20_http: cb_write_headers: Adding header Set-Cookie value is

JSESSIONID=0000GytzwDUes2NUCISYUDJxUX3:12n7511dh; Path=/TRACE: mod_was_ap20_http: cb_write_headers: Adding header Date value is Wed, 10

Sep 2008 23:26:27 GMTTRACE: mod_was_ap20_http: cb_write_headers: Adding header Server value is

WebSphere Application Server/6.1TRACE: mod_was_ap20_http: cb_write_headers: Adding header Expires value is Thu,

01 Dec 1994 16:00:00 GMTTRACE: mod_was_ap20_http: cb_write_headers: Adding header Cache-Control value is

no-cache="set-cookie, set-cookie2"TRACE: lib_htresponse: htresponseGetContentBlock: Getting the next content blockTRACE: ws_esi: readResponseBody, len_p=261TRACE: mod_was_ap20_http: cb_write_body: In the write body callback writing 261DETAIL: ws_common: websphereEndRequest: Ending the requestDEBUG: lib_stream: flushStream: Flushing the streamTRACE: ws_transport: transportStreamEnqueue: Adding existing stream to the queueDEBUG: lib_stream: flushStream: Flushing the streamDEBUG: ws_common: websphereEndRequest: socket 600 was added back to GAME3:9082

queueTRACE: mod_was_ap20_http: as_handler: set env WAS "GAME3:9082"TRACE: mod_was_ap20_http: in as_logger

End of the transaction

Page 45: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 45

Common Plug-in problems HTTP 404� Usually a 404 (page not found) error in the response means

that the requested URI is not in the Plug-in config, and did not match. The request was handled by the web server instead, but the file does not exist there either, so the web server sends a HTTP 404 error back to the browser.

� However, it is possible to get a 404 error from the WAS server itself. If the plug-in does match and does send the request to the WAS server, but that application is currently stopped, the trace will show a 404 error coming back in the response from the server. So the plug-in sends the 404 error back to the browser.

Page 46: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 46

404 error in the response from WAS server:

DETAIL: lib_htresponse: htresponseRead: Reading the response: 5c981cDETAIL: HTTP/1.1 404 Not FoundDETAIL: Content-Type: text/htmlDETAIL: Transfer-Encoding: chunkedDETAIL: Connection: CloseDETAIL: Date: Tue, 02 Dec 2008 02:05:08 GMTDETAIL: Server: WebSphere Application Server/6.1TRACE: ws_common: websphereExecute: Read the response; breaking out of loopTRACE: ws_common: websphereExecute: Done with Request to app server processing

Page 47: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 47

Common Plug-in problems: Internal Server Error

� If the request is matched by the plug-in and is sent to the WAS server, but the server is unresponsive or down, the plug-in will send an HTTP 500 error, which will show up as “Internal Server Error” in the browser.

� If there are multiple servers in the ServerCluster, the plug-in will try all of the servers before sending the 500 error to the browser.

Page 48: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 48

HTTP 500 - Internal Server Error

ERROR: ws_common: websphereGetStream: Connect timeout firedTRACE: ws_common: websphereGetStream: socket 1628 closed - failed non-blocking connect

ERROR: ws_common: websphereExecute: Failed to create the streamERROR: ws_server: serverSetFailoverStatus: Marking GAME3Node01_member4 down

STATS: ws_server: serverSetFailoverStatus: Server GAME3Node01_member4 : pendingRequests 0 failedRequests 1 affinityRequests 0 totalRequests 1.

ERROR: ws_common: websphereHandleRequest: Failed to execute the transaction to 'GAME3Node01_member4'on host 'GAME3'; will try another one

ERROR: ws_common: websphereWriteRequestReadResponse: Failed to find an app server to handle this request

Page 49: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 49

Plug-in Fixpacks

� Often the problem stems from a defect in the plug-in code. These types of problems are easily resolved by installing the latest fixpack for the Plug-in.

� Recommended Updates Page:http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980

� The plug-in level should be equal to, or greater than, the level of WebSphere Application Server:

http://www.ibm.com/support/docview.wss?uid=swg21160581

Page 50: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 50

PK63499 / PK67161

� This defect affected Plug-in levels 6.0.2.25, 6.0.2.27, 6.1.0.15, and 6.1.0.17.

� If the browser disconnected it would cause the plug-in to incorrectly mark the server as “down”.

� After that many users would see 500 errors when trying to access the application in WebSphere Application Server.

� The fix for this defect is in 6.0.2.29 and 6.1.0.19 and higher.

Page 51: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 51

Summary

� The web server plug-in is an agent between web server and WAS.

� We have seen the elements of the Plug-in configuration.

� Use Plug-in MustGather documents to know which traces to gather.

� Understand the flow of a plug-in transaction so you can follow it in the plug-in trace and look for problems.

� We discussed Common Plug-in problems like 404 and 500 errors.

� Install latest Plug-in fixpacks to see if the problem is fixed.

Page 52: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 52

Additional Web Server Plug-in Resources

� WAS main support page: (search for errors and keywords)http://www.ibm.com/software/webservers/appserv/was/support/

� InfoCenter description of all plugin-cfg.xml settings and options:http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/co

m.ibm.websphere.nd.doc/info/ae/ae/rwsv_plugincfg.html

� Technote: Common questions about the web server Plug-inhttp://www.ibm.com/support/docview.wss?rs=180&uid=swg21318463

Page 53: WSTE 12092008 Plugin Web Sphere 61 Shetty Reid

IBM Software Group

WebSphere® Support Technical Exchange 53

Questions and Answers

Contact: [email protected] or [email protected]