Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005943 [Resin] minor always 08-31-15 06:59 03-13-17 14:56
Reporter stbu View Status public  
Assigned To
Priority normal Resolution fixed  
Status closed   Product Version 4.0.44
Summary 0005943: Dupliate Access-Log Entries when using host-level Redirect Rule with an IfMBeanEnabled condition
Description I've had the following configuration in my Resin-Pro 4.0.44 resin.xml:

    <!-- the default host, matching any host name -->
    <host id="" root-directory=".">
      <!--
         - webapps can be overridden/extended in the resin.xml
        -->
      <web-app id="/" root-directory="webapps/ROOT"/>

! <resin:Redirect regexp="^/(dupl-access-log|other-apps|with-db-access)/(.*)$" target="/maintenance.jsp">
! <resin:IfMBeanEnabled name="FailureRewrite" enabled="false"/>
! </resin:Redirect>
!
! <web-app id="/dupl-access-log" root-directory="webapps/test"/>

    </host>

Lines starting with "!" have been added. This configuration allows to redirect requests to a maintenance page whenever the FailureRewrite was enabled via JMX - initially this rule is not enabled.

However this is causing that any requests to web-app /dupl-access-log is causing duplicate entries in the access.log file. For example:

[::1] - - [31/Aug/2015:15:35:11 +0200] "GET /dupl-access-log/ HTTP/1.1" 200 31 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36"
[::1] - - [31/Aug/2015:15:35:11 +0200] "GET /dupl-access-log/ HTTP/1.1" 200 31 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36"
[::1] - - [31/Aug/2015:15:35:27 +0200] "GET /dupl-access-log/test123.txt HTTP/1.1" 404 211 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36"
[::1] - - [31/Aug/2015:15:35:27 +0200] "GET /dupl-access-log/test123.txt HTTP/1.1" 404 211 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36"
[::1] - - [31/Aug/2015:15:37:56 +0200] "GET /dupl-access-log/sample-error.jsp HTTP/1.1" 500 4316 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36"
[::1] - - [31/Aug/2015:15:37:56 +0200] "GET /dupl-access-log/sample-error.jsp HTTP/1.1" 500 4316 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36"

In the Stack Trace of an exception (see "Additional Information" in this bug-report) you can recognize that AccessLogFilterChain.doFilter appears twice.

Expected result:
Just one entry in access.log for every request.

Additional Information Caused by: java.lang.IllegalStateException: Demonstration Error
    at _jsp._sample_22derror__jsp._jspService(sample-error.jsp:7)
    at _jsp._sample_22derror__jsp._jspService(sample-error.jsp:3)
    at com.caucho.jsp.JavaPage.service(JavaPage.java:64)
    at com.caucho.jsp.Page.pageservice(Page.java:548)
    at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:194)
    at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156)
>>> at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95)
    at com.caucho.server.rewrite.MatchFilterChain.doFilter(MatchFilterChain.java:98)
    at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156)
>>> at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95)
    at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:289)
    at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:838)
    at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1349)
    at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1305)
    at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1289)
    at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1197)
    at com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:993)
    at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117)
    at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93)
    at com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:169)
    at com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61)
    at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
    at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)
Attached Files

- Relationships

- Notes
(0006741)
ferg
03-13-17 14:56

server/02ex, server/02ey
 

- Issue History
Date Modified Username Field Change
08-31-15 06:59 stbu New Issue
08-31-15 06:59 stbu Issue Monitored: stbu
03-13-17 14:56 ferg Note Added: 0006741
03-13-17 14:56 ferg Status new => closed
03-13-17 14:56 ferg Resolution open => fixed
03-13-17 14:56 ferg Fixed in Version  => 4.0.52


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker