tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <>
Subject Re: Query related to detection of the Source IP Address in Load-balancing mode
Date Wed, 23 Nov 2011 19:38:03 GMT
On 23/11/2011 06:37, Faseela K wrote:
> Hi,
> I have applications running on two tomcat servers which are in load balancing mode.

OK so far.

> 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).

So server #1 connects to the load balancer?

On which server is the load balancer?

> If the client is outside the two loadbancing servers, I am getting the proper client
IP address.

Sounds like the application is working properly then.

> 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

If the client is on the same physical server as the Tomcat, then the
correct IP address *is*

Your networking stack may well identify that it's a local operation &
bypass the time-consuming roundtrip through the network device, just
doing a shorter in-memory operation via the loopback address.


> Thanks,
> Faseela



View raw message