logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache load balancing using md_jk on 2 Tomcats BO4.2 fails
Author
pshar



Joined: 30 Jun 2020
Posts: 2
Location: India

PostPosted: Wed 01 Jul '20 15:40    Post subject: Apache load balancing using md_jk on 2 Tomcats BO4.2 fails Reply with quote

Tomcat (version 8.5.51) is installed on Server 1 and server 2, Apache (httpd-2.4.25-x86-vc14-r1) is on Server1
Worker 1 is configured to Server 1 and Worker 2 to Sever 2.
We have followed the following SAP notes
1676146 - How to configure Apache as a Reverse Proxy with BI 4.0?
2699221 - Session expiry and RWS 00008 error while accessing Fiori BILaunchpad through loadbalancer
https://blogs.sap.com/2015/04/01/wacs-load-balancing-for-restful-web-services/
Issue:
Tomcat off on server 1 redirects users to server 2
Tomcat off on server 2 redirects users to server 1
Switched on both Tomcat on server 1 and server 2 requires user to refresh url twice in order to logon
Test Apache via https://<servername> / works
Switched off Tomcat on server1 redirects user to server 2 therefore load balancing is working
Any help resolving this issue would be appreciated
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Thu 02 Jul '20 9:14    Post subject: Reply with quote

What is missing in that example is stickysession=JSESSIONID and ProxyPassReverse

e.g.

Code:

ProxyPass /examples balancer://mycluster stickysession=JSESSIONID
ProxyPassReverse /examples balancer://mycluster stickysession=JSESSIONID


Also I would use AJP instead of http (load mod_proxy_ajp) when there is Tomcat. I don't know that software, but in general Tomcat support ajp

Code:

ProxyRequests Off
ProxyPass /examples balancer://mycluster stickysession=JSESSIONID
ProxyPassReverse /examples balancer://mycluster stickysession=JSESSIONID

<Proxy balancer://mycluster>
   BalancerMember ajp://192.168.100.1:8090/examples route=server1
   BalancerMember ajp://192.168.100.2:8090/examples route=server2
</Proxy>
Back to top
pshar



Joined: 30 Jun 2020
Posts: 2
Location: India

PostPosted: Thu 02 Jul '20 10:48    Post subject: Reply with quote

Thanks alot for reply,

Our current config (httpd.conf) file as below

Admin note: config moved to https://apaste.info/hsbI please see the forum rules.


Please advise what needs to be updated , commenting Proxypass and Proxypassreverse is giving internal server error in restful application
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Thu 02 Jul '20 21:23    Post subject: Reply with quote

You can not use mod_jk (JkMount) and mod_proxy_* at the same time to the same resource. At least I'm not sure if that is overlapping, since I don't know the application.

What is in your error log about this? Did you try the sticky session with your http:// instead of the ajp:// ?
Back to top


Reply to topic   Topic: Apache load balancing using md_jk on 2 Tomcats BO4.2 fails View previous topic :: View next topic
Post new topic   Forum Index -> Apache