OHS Redirects to Wrong Instance When Running Behind Load Balancer
Last updated on OCTOBER 21, 2016
Applies to:Oracle HTTP Server - Version 18.104.22.168 to 10.1.3.0.0 [Release AS10g to AS10gR3]
Information in this document applies to any platform.
This problem can occur on any platform.
OAS version: 10.1.3
Two nodes of Oracle HTTP Server with OC4J are fronted by a hardware load balancer, for example:
Client------>Load Balancer ------|------> OHS_2 -> OC4J_2 |------> OHS_1 -> OC4J_1
The issue arises when one of the servers wishes to do an "HttpResponse.sendRedirect()". The redirect is encoded as the machine name upon which the OC4J/Apache is running i.e. "http://LOAD_BALANCER/welcome.jsp" is redirected to "http://OHS_1/realTarget.jsp".
In Tomcat, the response is encoded as that which the client originally sent via the load balancer.
For example, "http://LOAD_BALANCER/welcome.jsp". This is successfully redirected to "http://LOAD_BALANCER/realTarget.jsp".
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms