Bug 64528 - Regression in 8.5.56, no statistics in GlobalRequestProcessor MBean anymore
Summary: Regression in 8.5.56, no statistics in GlobalRequestProcessor MBean anymore
Status: RESOLVED WORKSFORME
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.5.56
Hardware: PC All
: P2 normal (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-16 15:24 UTC by Markus Schlegel
Modified: 2020-06-16 16:22 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Schlegel 2020-06-16 15:24:56 UTC
We have used GlobalRequestProcessor MBean recently to access embedded Tomcat's performance metrics.
This worked very well with 8.5.55 and 8.5.54 (and maybe it worked before too, but not tested).
With 8.5.56, all values of GlobalRequestProcessor are 0 now.

I made a diff of both versions (8.5.55 against 8.5.56) sourcecode but could not find an obvious source of the problem. 

I have seen Bug 63362, but this is not related, since it worked before 8.5.56 and we are not using websockets.
Comment 1 Mark Thomas 2020-06-16 15:31:57 UTC
OK. I can't reproduce this with current 8.5.x and a standard Tomcat build.

Switching to the 8.5.56 tag...
Comment 2 Mark Thomas 2020-06-16 15:42:16 UTC
And I can't reproduce it from the 8.5.56 tag with either a standard Tomcat instance nor with the embedded JARs.

This looks like configuration error at this point. Please use the users mailing list for further assistance.

http://tomcat.apache.org/lists.html#tomcat-users
Comment 3 Markus Schlegel 2020-06-16 16:06:57 UTC
If I disable the http/2 upgrade, it works again:
  
    boolean ENABLE_HTTP2 = false;
    if (ENABLE_HTTP2) {
        Http2Protocol http2Protocol = new Http2Protocol();
        sslConnector.addUpgradeProtocol(http2Protocol);
    }

We had the ENABLE_HTTP2=true in our code before, such that our customers could easily enable http/2 by simply adding the native library. However, most of the time this was not the case. Therefore, http/2 was never really used in our app.
I have disabled it now by default and GlobalRequestProcessor is working again now.
Please note, that using GlobalRequestProcessor for performance metrics is being recommended in many documentations about Tomcat. People and tools might rely on it.
Comment 4 Markus Schlegel 2020-06-16 16:13:17 UTC
Given that it is related to the http/2 protocol upgrade, I think it indeed is related to Bug 63362.
Nevertheless, since Tomcat Performance optimisation literature all over the net refers to GlobalRequestProcessor as a source of metrics, I would very welcome if that MBean would also work for upgraded http/2 connections.
Also it is still unclear for me which code change caused this problem to appear in 8.5.56.
Comment 5 Mark Thomas 2020-06-16 16:22:43 UTC
Correct HTTP/2 traffic isn't included in the the GlobalRequestProcessor metrics either. I'll add a note to Bug 63362.