https://bz.apache.org/bugzilla/show_bug.cgi?id=58289
Bug ID: 58289 Summary: request.getRemoteAddr() sometimes returning IP address from the previous request Product: Tomcat 7 Version: 7.0.54 Hardware: PC Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: t.j.h...@open.ac.uk This is exactly the same symptoms as Bug 51872, which was fixed in 7.0.22 (see comment 11). However, there are following comments there which say other people are still seeing the problem, presumably due to other causes. We are currently seeing this bug in Tomcat 7.0.54, running under RHEL 7. I am doing what it says in comment 16 of Bug 51872 and creating a new issue. I do not have any code for a minimal reproducible test-case, but I can definitely reproduce the issue in my application as follows: We have Tomcat set up behind Apache acting as a proxy, which I believe is quite a common set-up. I don't know if that is signifcant for this bug. To reproduce the problem, send a high volume of * requests for http://example.com/servlet/url1 from IP address 1, and * requests for http://example.com/servlet/url2 from IP address 2. Then, if you look in the Apache access logs, all the requests are logged with the correct IP address (IP address 1 or 2). However, in the Tomcat access logs (e.g. /var/log/tomcat/localhost_access_log.2015-08-25.txt) a small proportion of the requests (just under 5%) get the wrong IP address logged (IP1 when it should be IP2, or vice versa). Most of the requests are logged with the correct IP. Corresponding to this, in my application request.getRemoteAddr() returns the same IP address that is in the Tomcal logs (unsuprising). That then causes the application errors that is what lead me to start investigating this. We have been able to work-around this problem by setting org.apache.catalina.connector.RECYCLE_FACADES=true. With that setting the bug does not occur. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org