-1

We have set an IHS instance. The instance is serving 2 Websphere JVM s in remote machine (both these WAS jvm s are in same remote machine) . We have not created any cluster.

Now if both JVM s are in loadbalance mode i.e. having LoadBalanceWeight != 0, we are unable to access the application static files (images embedded in web pages) with web url via port 80. On inspecting html page , there are multiple instances of "Failed to load resource: the server responded with a status of 404 (Not Found)".

However , If we make LoadBalanceWeight=0 in IHS pluginfile for any one of the JVMs , we are able to access application static files with web url successfully - absolutely no issues.

Contents of working plugin-cfg.xml ->

<?xml version="1.0" encoding="ISO-8859-1"?>
<Config ASDisableNagle="false" AcceptAllContent="false" AppServerPortPreference="HostHeader" ChunkedResponse="false" FIPSEnable="false" FailoverToNext="false" HTTPMaxHeaders="300" IISDisableNagle="false" IISPluginPriority="High" IgnoreDNSFailures="false" KillWebServerStartUpOnParseErr="false" MarkBusyDown="false" OS400ConvertQueryStringToJobCCSID="false" RefreshInterval="10" ResponseChunkSize="64" SSLConsolidate="true" TrustedProxyEnable="false" VHostMatchingCompat="false">
   <Log LogLevel="Error" Name="c:\IBM\HTTPServer\Plugins\logs\webserver1\http_plugin.log"/>
   <Property Name="ESIEnable" Value="true"/>
   <Property Name="ESIMaxCacheSize" Value="1024"/>
   <Property Name="ESIInvalidationMonitor" Value="false"/>
   <Property Name="ESIEnableToPassCookies" Value="false"/>
   <Property Name="ESICacheidFull" Value="false"/>
   <VirtualHostGroup Name="default_host">
      <VirtualHost Name="*:80"/>
      <VirtualHost Name="*:443"/>
   </VirtualHostGroup>
   <ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="true" LoadBalance="Round Robin" Name="sserver1_ASAPD01Node01_Cluster" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">
      <Server CloneID=eappsrv3 LoadBalanceWeight=100 ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="ASAPD01Node01_server1" ServerIOTimeout="0" WaitForContinue="false">
         <Transport Hostname=x.x.x.x Port="9082" Protocol="http"/>
         <Transport Hostname=x.x.x.x Port="9445" Protocol="https">
            <Property Name="keyring" Value="c:\IBM\HTTPServer\Plugins\config\webserver1\plugin-key.kdb"/>
            <Property Name="stashfile" Value="c:\IBM\HTTPServer\Plugins\config\webserver1\plugin-key.sth"/>
         </Transport>
      </Server>
      <Server CloneID=eappsrv4 LoadBalanceWeight=0 Name="ASAPD01Node02_server1" WaitForContinue="false" ServerIOTimeout="0" MaxConnections="-1" ExtendedHandshake="false" ConnectTimeout="0">
         <Transport Protocol="http" Port="9084" Hostname=x.x.x.x/>
         <Transport Protocol="https" Port="9447" Hostname=x.x.x.x>
           <Property Name="keyring" Value="c:\IBM\HTTPServer\Plugins\config\webserver1\plugin-key.kdb"/>
           <Property Name="stashfile" Value="c:\IBM\HTTPServer\Plugins\config\webserver1\plugin-key.sth"/>
         </Transport>
      </Server>
   </ServerCluster>
   <UriGroup Name="default_host_server1_ASAPD01Node01_Cluster_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="/mno/*"/>
      <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/ivt/*"/>
   </UriGroup>
   <Route ServerCluster="server1_ASAPD01Node01_Cluster" UriGroup="default_host_server1_ASAPD01Node01_Cluster_URIs" VirtualHostGroup="default_host"/>
   <RequestMetrics armEnabled="false" loggingEnabled="false" rmEnabled="false" traceLevel="HOPS">
      <filters enable="false" type="URI">
         <filterValues enable="false" value="/snoop"/>
         <filterValues enable="false" value="/hitcount"/>
      </filters>
      <filters enable="false" type="SOURCE_IP">
         <filterValues enable="false" value="255.255.255.255"/>
         <filterValues enable="false" value="254.254.254.254"/>
      </filters>
      <filters enable="false" type="JMS">
         <filterValues enable="false" value="destination=aaa"/>
      </filters>
      <filters enable="false" type="WEB_SERVICES">
         <filterValues enable="false" value="wsdlPort=aaa:op=bbb:nameSpace=ccc"/>
      </filters>
   </RequestMetrics>
</Config>

Exceptions in plugin log when both nodes are up is as below ->

In Plugin log getting ->

[Fri May 13 02:24:13 2016] 00001828 000017c0 - DEBUG: lib_util: parseHostHeader: Defaulting port for scheme 'http'
[Fri May 13 02:24:13 2016] 00001828 000017c0 - DEBUG: lib_util: parseHostHeader: Host: 'www.abc.com', port 80
[Fri May 13 02:24:13 2016] 00001828 000017c0 - DEBUG: ws_common: websphereCheckConfig: Current time is 1463106253, next stat time is 1463106260
[Fri May 13 02:24:13 2016] 00001828 000017c0 - DETAIL: ws_common: websphereShouldHandleRequest: trying to match a route for: vhost='www.abc.com'; uri='/css/bootstrap.css'
[Fri May 13 02:24:13 2016] 00001828 000017c0 - DEBUG: ws_common: webspherePortNumberForMatching: Using logical.
[Fri May 13 02:24:13 2016] 00001828 000017c0 - TRACE: ws_common: websphereVhostMatch: Comparing '*:443' to 'www.abc.com:80' in VhostGroup: default_host
[Fri May 13 02:24:13 2016] 00001828 000017c0 - TRACE: ws_common: websphereVhostMatch: Comparing '*:80' to 'www.abc.com:80' in VhostGroup: default_host
[Fri May 13 02:24:13 2016] 00001828 000017c0 - DEBUG: ws_common: websphereVhostMatch: Found a match '*:80' to 'www.abc.com:80' in VhostGroup: default_host with score 1, exact match 0
[Fri May 13 02:24:13 2016] 00001828 000017c0 - TRACE: ws_common: websphereUriMatch: uri length smaller than uri defs so skipping the rest
[Fri May 13 02:24:13 2016] 00001828 000017c0 - TRACE: ws_common: websphereUriMatch: Failed to match: /css/bootstrap.css
[Fri May 13 02:24:13 2016] 00001828 000017c0 - DETAIL: ws_common: websphereShouldHandleRequest: No route found
[Fri May 13 02:24:13 2016] 00001828 000017c0 - TRACE: mod_was_ap20_http: as_handler: In the app server handler
[Fri May 13 02:24:13 2016] 00001828 0000173c - DEBUG: lib_util: parseHostHeader: Defaulting port for scheme 'http'
[Fri May 13 02:24:13 2016] 00001828 0000173c - DEBUG: lib_util: parseHostHeader: Host: 'www.abc.com', port 80
[Fri May 13 02:24:13 2016] 00001828 0000173c - DEBUG: ws_common: websphereCheckConfig: Current time is 1463106253, next stat time is 1463106260
[Fri May 13 02:24:13 2016] 00001828 0000173c - DETAIL: ws_common: websphereShouldHandleRequest: trying to match a route for: vhost='www.abc.com'; uri='/css/docs.min.css'
[Fri May 13 02:24:13 2016] 00001828 0000173c - DEBUG: ws_common: webspherePortNumberForMatching: Using logical.
[Fri May 13 02:24:13 2016] 00001828 0000173c - TRACE: ws_common: websphereVhostMatch: Comparing '*:443' to 'www.abc.com:80' in VhostGroup: default_host
[Fri May 13 02:24:13 2016] 00001828 0000173c - TRACE: ws_common: websphereVhostMatch: Comparing '*:80' to 'www.abc.com:80' in VhostGroup: default_host
[Fri May 13 02:24:13 2016] 00001828 0000173c - DEBUG: ws_common: websphereVhostMatch: Found a match '*:80' to 'www.abc.com:80' in VhostGroup: default_host with score 1, exact match 0
[Fri May 13 02:24:13 2016] 00001828 0000173c - TRACE: ws_common: websphereUriMatch: uri length smaller than uri defs so skipping the rest
[Fri May 13 02:24:13 2016] 00001828 0000173c - TRACE: ws_common: websphereUriMatch: Failed to match: /css/docs.min.css
[Fri May 13 02:24:13 2016] 00001828 0000173c - DETAIL: ws_common: websphereShouldHandleRequest: No route found
[Fri May 13 02:24:13 2016] 00001828 0000173c - TRACE: mod_was_ap20_http: as_handler: In the app server handler

Note, "fileServingEnabled" property in the ibm-web-ext.xmi file is set as true for both WAS JVMs.

What are we missing here for loadbalancing config that creates issue when both nodes are up ?

BlueSaturn
  • 7
  • 1
  • 4
  • Can you elaborate on "context root not added"? There is normally no such step. Links should be relatively or contain the context root. – covener May 12 '16 at 13:52
  • When you inspect element of the HTML page , it shows messages like " Failed to load resource: the server responded with a status of 404 (Not Found) http:///css/bootstrap.css" . My code developer says the path for resource is not forming correctly , may be issue with context root not appending . But the strange thing is when we stop one of the WAS nodes , web url works fine and all static resources gets loaded !! Issue is only when both WAS nodes are up . – BlueSaturn May 12 '16 at 14:35
  • I edited my question with Plugin Log snippets – BlueSaturn May 12 '16 at 15:00
  • Are you explicitly doing rewrites to hide your context root? What is the verbatim broken HTML link? – covener May 12 '16 at 16:08
  • Hi Covener , we are not doing any explicit rewrites . Updated with I have updated with Pluginfile contents . – BlueSaturn May 13 '16 at 18:07
  • I'm more interested in your HTML, because your links seemingly have no context root. It makes sense that links like /images/ and /css/ are not sent to your application. – covener May 16 '16 at 12:35

2 Answers2

0

The two plugin log messages indicate that the requested URI doesn't map to anything listed in the plugin-cfg.xml file. Does your XML contain a context root of /images/*? Are you manually combining two generated plugin-cfg.xml files? If so, you may be leaving out information.

Anytime the plugin is unable to map a request, it gives it back to the web sever to handle it which in your case results in a 404 response.

Without having a complete plugin traces along with the associated XML of both working and non working instances, it's hard to give a definitive answer.

R Hill
  • 11
  • 3
  • Hi Hill , I have updated with Pluginfile contents and exceptions in plugin log .My understanding is there is issue with loading static files it should happen irrespective of WAS nodes status .But strangely it works fine one node is down and doesnot work while both nodes are up – BlueSaturn May 13 '16 at 18:06
  • There's a disconnect between what you are asking and what is shown. There is no possible way that /css/docs.min.css would ever be served from WebSphere given the list of URI within the XML regardless of LoadBalanceWeight. The plugin's first responsibility is to determine if the incoming request should be handled by WebSphere. The sample log shows that it's unable to find a URI match to the request. LoadBalanceWeight comes into play after it determines the request should move forward to WebSphere and deciding which server should handle the request. I suggest you open a PMR with IBM. – R Hill May 16 '16 at 13:33
0

The issue was resolved finally . I suspect it was due to problems in session handling

Instead of below

<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/mno/*"/>

I set separate affinity cookies in WAS console session management for both nodes and updated plugin file as

<Uri AffinityCookie="App1" AffinityURLIdentifier="jsessionid" Name="/mno/*"/>
<Uri AffinityCookie="App2" AffinityURLIdentifier="jsessionid" Name="/mno/*"/>

And on reloading the page, static images are coming.

However , now team is facing some issues with PPR -;partial page reloading' exceptions that application dev team is checking on

BlueSaturn
  • 7
  • 1
  • 4