Support Article
Unable to access Pega using balancing on Apache 2.4.12 WebServer
Summary
Unable to access Pega using balancing on Apache 2.4.12 WebServer
The customer uses an Apache 2.4.12 WebServer where they configured a Virtual Host which points (in HTTPS so through the 443 port) to an Application Server where there is WebLogic and two Managed Nodes of Pega.
The Pega nodes are on two different ports (9101 and 9102) on the same machine it028cxr.it.sedc.internal.CUSTOMER.com .
They then configured a Virtual Host on the Apache to implement the balancing between the two Pega nodes and in the configuration they used the Proxy balancer and ProxyPass/ProxyPassReverse directives.
The problem was that this balancing did not seem working well!
When they tried accessing Pega through the Apache and entering their credentials, it did not work and showed an error. The login page was also strange.
The strange thing was that, if the customer did not have both BalancerMembers active in Proxy balancer declaration, commenting one of them (doesn't mind which one!) like:
<Proxy balancer://intpegapre>
BalancerMember https://it028cxr.it.sedc.internal.CUSTOMER.com:9101
# BalancerMember https://it028cxr.it.sedc.internal.CUSTOMER.com:9102
</Proxy>
ProxyPass "/" "balancer://intpegapre/"
ProxyPassReverse "/" "balancer://intpegapre/"
it worked well! So the ProxyPass as such seemed to work fine, it entered well in balancer declaration.
But if they did not comment one of the BalancerMembers, and kept both active (the final aim) like:
<Proxy balancer://intpegapre>
BalancerMember https://it028cxr.it.sedc.internal.CUSTOMER.com:9101
BalancerMember https://it028cxr.it.sedc.internal.CUSTOMER.com:9102
</Proxy>
ProxyPass "/" "balancer://intpegapre/"
ProxyPassReverse "/" "balancer://intpegapre/"
it failed.
Error Messages

Steps to Reproduce
Not Applicable
Root Cause
The configuration for the load balancer was incomplete. That it works fine with just on member, and that the login page was screwed up, indicates that the session stickiness was not confgured correctly.
Resolution
The customer made the following changes to the Apache configuration for the load balancing:
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/"env=BALANCER_ROUTE_CHANGED
<Proxy "balancer://intpegapre">
BalancerMember "https://it028cxr.it.sedc.internal.CUSTOMER.com:9101" route=1
BalancerMember "https://it028cxr.it.sedc.internal.CUSTOMER.com:9102" route=2
ProxySet stickysession=ROUTEID
</Proxy>
ProxyRequests off
ProxyPreserveHost on
ProxyPass "/" "balancer://intpegapre/"
ProxyPassReverse "/" "balancer://intpegapre/"
Published March 12, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.