Apache creating connection to incorrect WLS instance

I have 2 applications running in parallel on WLS 8.1SP6. I am connecting via Apache 2.0.55 via directive to the respective application instance. I find that Apache is sometimes directing the request to the incorrect member of WebLogicCluster.

**Apache Log**:
Thu May 21 07:30:46 2015 <2993214321898463437> The final request string is '/appNamed2/index.jsp'
Thu May 21 07:30:46 2015 <2993214321898463437> SEARCHING id=[server2_DNS:61007] from current ID=[server1_DNS:61006,server3_DNS:61008,server4_DNS:61009]
Thu May 21 07:30:46 2015 <2993214321898463437> The two ids failed to match
Thu May 21 07:30:46 2015 <2993214321898463437> SEARCHING id=[server2_DNS:61007] from current ID=[server2_DNS:61007]
Thu May 21 07:30:46 2015 <2993214321898463437> The two ids matched
Thu May 21 07:30:46 2015 <2993214321898463437> @@@FOUND...id=[**server2_DNS:61007**], server_name=[apacheServer], server_port=[61001]
Thu May 21 07:30:46 2015 <2993214321898463437> getPreferred: availcookie=[SESSION=xzQwcm+xqTVV4rIFt~~~Truncated to save space~~~TNGIxNJ]
Thu May 21 07:30:46 2015 <2993214321898463437> attempt #0 out of a max of 5
Thu May 21 07:30:46 2015 <2993214321898463437> Trying a pooled connection for 'xx.xxx.xx.xx/61008/0'
Thu May 21 07:30:46 2015 <2993214321898463437> getPooledConn: No more connections in the pool for Host[**xx.xxx.xx.xx**] **Port[61008]** SecurePort[0]
Thu May 21 07:30:46 2015 <2993214321898463437> general list: trying connect to **'xx.xxx.xx.xx'/61008/0** at line 2696 for '/appNamed2/index.jsp'

From the log you can see that the server has matched this application context to server2_DNS:61007 which is where I want it to send the request to. But instead, while establishing the connection it has resolved it to the IP Address (xx.xxx.xx.xx) and Port number(61008) belonging to server3_DNS:61008, where my application is not found. I cannot link it to DNS porblem, as you can see port is also changed by Apache here.

**httpd.conf**
<IfModule mod_weblogic.c>
  WebLogicCluster server1_DNS:61006,server3_DNS:61008,server4_DNS:61009
  MatchExpression *.*
  Debug ERR
  WLIOTimeoutSecs 600
  DebugConfigInfo ON
  KeepAliveEnabled ON
  WLLogFile appNamed1.log
</IfModule>

<Location /appNamed1>
    SetHandler weblogic-handler
    PathTrim /
    #RequestHeader add HTTP_SM_USER "neosa"
</Location>

<Location ~ /appNamed2>
SetHandler weblogic-handler
WebLogicCluster server2_DNS:61007
MatchExpression *.*
Debug ALL
DebugConfigInfo ON
KeepAliveEnabled ON
WLLogFile appNamed2.log
</Location>

PS: I am not encountering this issue with Apache 2.0.54

Thank You

Pradeep


Source: apache

Leave a Reply