tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <...@pidster.com>
Subject Re: Tomcat 7 sometime returns wrong IP address with request.getRemoteAddr()
Date Thu, 22 Sep 2011 20:34:06 GMT
On 22/09/2011 03:06, Caldarale, Charles R wrote:
>> From: charlesk40 [mailto:charlesk40@yahoo.com] 
>> Subject: Tomcat 7 sometime returns wrong IP address with request.getRemoteAddr()
> 
>> box1 makes a request to Tomcat7 server but the request.getRemoteAddr()
>> returns the IP address of box2 (or box n).  This problem doesn't happen
>> all the time which making it more difficult to debug.
> 
> This kind of thing is pretty much always an application error relating to scope of a
variable.  For example, storing a reference to the Request object in a ThreadLocal or an instance
or static variable of a servlet can lead to this kind of erroneous behavior.  Difficult to
find other than by meticulous code inspection.

+1

Which exact version of Tomcat 7, are you using the latest?


p



Mime
View raw message