My Oracle Support Banner

OHS Redirects to Wrong Instance When Running Behind Load Balancer (Doc ID 403727.1)

Last updated on AUGUST 22, 2022

Applies to:

Oracle HTTP Server - Version to [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".




To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.