users@glassfish.java.net

Re: Getting Client Ip Address when using Load balancer Plugin

From: Kshitiz Saxena <Kshitiz.Saxena_at_Sun.COM>
Date: Mon, 03 Aug 2009 11:46:20 +0530

Hi Lasitha,

Please check section "Using Redirects with the HTTP Load Balancer" on
page
http://docs.sun.com/app/docs/doc/820-4341/abdhs?l=en&a=view&q=authpassthroughenabled.
Requests proxied by web-server has required information. By configuring
properties mentioned in that section, application server will start
parsing them and setting appropriate values on request.

Thanks,
Kshitiz

Lasitha Kodikara wrote:
>
> Hi,
>
> Recently we moved into a clustered deployment architecture. Before
> this change in our application we used to get the client IP address
> using request.getRemoteAddress() method. But now, when we call that
> method, we get the IP address of our Sun Web server.
>
> We are using the Glassfish 2.1 cluster with glassfish load balancing
> plug-in configured to Sun Web Server 7.0 Update 5.
>
> I have also changed the loadbalancer.xml file to send the monitoring
> data to application server by adding the following line.
>
> <property name="require-monitor-data" value="true"/>
>
> Still we can’t get the client IP address. Any help would be greatly
> appreciated.
>
> Best Regards,
>
> Lasitha
>
> *******************************************************************************************************************************************************************
>
> "The information contained in this email including in any attachment
> is confidential and is meant to be read only by the person to whom it
> is addressed. If you are not the intended recipient(s), you are
> prohibited from printing, forwarding, saving or copying this email. If
> you have received this e-mail in error, please immediately notify the
> sender and delete this e-mail and its attachments from your computer."
>
> *******************************************************************************************************************************************************************
>