tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Query related to detection of the Source IP Address in Load-balancing mode
Date Wed, 23 Nov 2011 10:04:01 GMT
Faseela K wrote:
> Hi,
> I have applications running on two tomcat servers which are in load balancing mode.
> If I try to access the application from the first server,and if the request is forwarded
to the second server,
> the request.getRemoteAddr() on the second server still returns ""(instead of
first server IP).
> If the client is outside the two loadbancing servers, I am getting the proper client
IP address.
> I am using tomcat 5.5.31 and mod_jk module for load balancing,and my platform is solaris
> Is there a way to get the actual client IP,rather than localhost,if the client is on
the same box as the tomcat server,and if the request is forwarded to the second load balancing
I believe that your explanation is a bit confused, or confusing.
If you use a front-end server and mod_jk to do the load-balancing between 2 Tomcats, it is

always the front-end which sends the request to one Tomcat.
It is not that one Tomcat passes a request to the other.

And there exists a parameter somewhere in the mod_jk setup, which controls whether the 
"remote client IP" address passed to Tomcat, is the one of the front-end server, or of the

remote client.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message