tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Tomcat 7 sometime returns wrong IP address with request.getRemoteAddr()
Date Thu, 22 Sep 2011 02:06:22 GMT
> 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.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message