Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

PRPC cluster in WebLogic fails with Apache Loadbalancing

SA-21396

Summary



The requirement is front-end a WebLogic cluster of 2 server nodes with a Apache Load balancer. The Apache server has been configured to use the WebLogic plugin mod_wl_22.so.

The Load balancing does not works as expected. The static content fails to retrieve and Ajax requests fail to execute. 



Error Messages



With WebLogic Plugin DEBUG enabled. The following error has been observed:

----- start -----
Mon Mar 14 12:36:27 2016 <2022114579553871> getpreferredServersFromCookie: [-1379039438]
Mon Mar 14 12:36:27 2016 <2022114579553871> primaryJVMID: [-1379039438]
secondaryJVMID: []
Mon Mar 14 12:36:27 2016 <2022114579553871> No of JVMIDs found in cookie: 1
Mon Mar 14 12:36:27 2016 <2022114579553871> getPreferredFromCookie: Start Position is 1, listLen is 2
Mon Mar 14 12:36:27 2016 <2022114579553871> getPreferredFromCookie: Either JVMIDs not set or they are stale. Will try to get JVMIDs from WLS
Mon Mar 14 12:36:27 2016 <2022114579553871> initJVMID: Iterating SrvrList from position 1

​-----  end  -----

The WebLogic Plugin DEBUG information suggest a JVMID is stale and therefore the plugin is attempting to redirect the request to a different server.

Steps to Reproduce



1) Set up a WebLogic cluster of 2 nodes.
2) Front-end the cluster with an Apache Server.
3) In Apache Server configuration, use the below configuration:


#################
LoadModule weblogic_module modules/mod_wl_22.so

<Location /prweb>
  SetHandler weblogic-handler
  WebLogicCluster host1:port1,host2:port2
  WLLogFile /path/more_paths/logs/WLDebug.log
  Debug All
  DebugConfigInfo ON
  WLSocketTimeoutSecs 600
  WLIOTimeoutSecs 600
  DynamicServerList OFF
  Idempotent OFF
  ConnectTimeoutSecs 120
  KeepAliveEnabled ON
</Location>
<Location /prhelp>
  SetHandler weblogic-handler
  WebLogicCluster host1:port1,host2:port2
</Location>
<Location /prsysmgmt>
  SetHandler weblogic-handler
  WebLogicCluster host1:port1,host2:port2
</Location>

<VirtualHost myaddress:myport>
ServerName myServer
ServerAdmin myServer
DocumentRoot "/myPaths/docs"
</VirtualHost>
​#################
 

Root Cause



The WebLogic plugin is not able to maintain sticky session policy which is required by PRPC application. Using the Google Chrome network tracing utility, the administrator could see the JSESSIONID changes:


Resolution



By discarding the WebLogic pluging and using Proxy setting instead, the load balancing is working as expected. The cookie values sticks to the session and all static content getting retrieved as expected.

Apache configuration:
<Proxy balancer://pegacluster>

# Set routing information cookie if no cookie was supplied / the worker route changed
Header add Set-Cookie "PEGACLUSTER=WORKER.%{BALANCER_WORKER_ROUTE}e;Path=/" env=BALANCER_ROUTE_CHANGED

BalancerMember http://host1:port1 route=http1 timeout=120 ttl=10
BalancerMember http://host2:port2 route=http2 timeout=120 ttl=10

ProxySet failontimeout=On
ProxySet forcerecovery=Off
ProxySet stickysession=PEGACLUSTER

</Proxy>

<Location /prweb/>
    RequestHeader set PegaRULES-SetContextURI https://host/prweb
    ProxyPass balancer://pegacluster/prweb/
    ProxyPassReverse balancer://pegacluster/prweb/
</Location>
<Location /prhelp/>
    RequestHeader set PegaRULES-SetContextURI https://host/prhelp
    ProxyPass balancer://pegacluster/prhelp/
    ProxyPassReverse balancer://pegacluster/prhelp/
</Location>
<Location /prsysmgmt/>
    RequestHeader set PegaRULES-SetContextURI https://host/prsysmgmt
    ProxyPass balancer://pegacluster/prsysmgmt/
    ProxyPassReverse balancer://pegacluster/prsysmgmt/
</Location>

Prconfig.xml configuration
<env name="initialization/contextrewriteenabled" value="true"/> 

If the requirement is to use the WebLogic plugin, administrators should engage Oracle for further investigations.

Suggest Edit

Published March 25, 2016 - Updated October 8, 2020

Did you find this content helpful? Yes No

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us