Jump to content
We've recently updated our Privacy Statement, available here ×
  • Drilldown request passing lots of parameter values results in a net::ERR_HTTP2_PROTOCOL_ERROR


    vchiem
    • Features: JasperReports Server, Parameters Version: v7 Product: JasperReports® Server

    Issue:

    We have a main report and a drilldown chart report.  On the main report, we have an input control that contains more than 140 values. 

    When a user selects a number of values from this input control greater than 110 and then attempt to perform a drilldown on the chart, the browser page reloads to display the following error:

    "This site can’t be reached
    The webpage at https://xxxxxxx might be temporarily down or it may have moved permanently to a new web address.
    ERR_HTTP2_PROTOCOL_ERROR"
    

    This only happens when the count of selected values goes beyond the threshold of 110, else the drill-down opens as expected.

    The drilldown request passing more than 110 parameter values as captured in a HAR file:

    Request URL: https://xxxxxxx/flow.html?_flowId=viewReportFlow&reportUnit=%2Fpublic%2F%2FReports%2Fdrilldown_report&Validity=2021-03-31&CalculationMethod=Percentage&Metric=2020
    &MyParameterValue=value1
    &MyParameterValue=value2
    &MyParameterValue=value3
    &MyParameterValue=value4
    &MyParameterValue=value5
    &MyParameterValue=value6
    &MyParameterValue=value7
    &MyParameterValue=value8
    &MyParameterValue=value9
    <..another 100 more of these &MyParameterValue...>
    &MyParameterValue=value111&LoggedInUserAttribute_UserCompany=xxxxx&_eventId_drillReport=&_flowExecutionKey=e5s2
    

    and the Response is:

    net::ERR_HTTP2_PROTOCOL_ERROR
    

    This issue has similar symptoms to the following article:

    "Hyperlinking to Another Report With Lots of Parameter Values Causes HTTP 400 Error" (See "Related Articles" section below for the link to the knowledge article)

    but the response error in this case is a ERR_HTTP2_PROTOCOL_ERROR and not a HTTP 400 error


    Solution:

    It is necessary to apply the maxHttpHeaderSize property as suggested in the mentioned article to avoid a HTTP 400 error. 

    The default value of maxHttpHeaderSize is 8192 bytes which would be insufficient given that the HAR capture computed 15555 bytes for the header. 

    The actual cause of the net::ERR_HTTP2_PROTOCOL_ERROR error is related to the HTTP/2 upgrade protocol that is configured in the Tomcat's server.xml.

    It may be necessary to set additional attributes such as the timeout properties below or it could be due to a bug in the HTTP/2 protocol depending on the exact Tomcat version used.

    (Refer to the "Related Articles" for Tomcat 9.0 change log for fixes) :

    <Connector port="8443"
               protocol="org.apache.coyote.http11.Http11AprProtocol"
               maxThreads="150"
               SSLEnabled="true"
               maxHttpHeaderSize="65536" >
        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol"
                         writeTimeout="60000"
                         readTimeout="60000"/>
        <SSLHostConfig>
            <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
                         certificateFile="conf/localhost-rsa-cert.pem"
                         certificateChainFile="conf/localhost-rsa-chain.pem"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>

    Note: The writeTimeout, readTimeout attributes set increases the default limit of 5000 ms. For more information on HTTP/2 connector attributes, refer to "Related Articles" for a link to the Tomcat HTTP/2 reference.

    Note 2: Following any changes to the server.xml, the Tomcat server needs to be restarted. 

    For any issues arising from testing the drilldown, the Tomcat server catalina log (for example <TOMCAT>/logs/catalina.2021-06-01.log) needs to be inspected at entries correlating to the time the drilldown exercise was performed. 


    Workaround/Alternative :

    Implementation using HTTP/1.1 instead of  HTTP/2. Modify <TOMCAT>/conf/server.xml to include maxHttpHeaderSize="65536" and remove <UpgradeProtocol>:

    <Connector port="8443"
               protocol="org.apache.coyote.http11.Http11AprProtocol"
               maxThreads="150"
               SSLEnabled="true"
               maxHttpHeaderSize="65536">
        <SSLHostConfig>
            <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
                         certificateFile="conf/localhost-rsa-cert.pem"
                         certificateChainFile="conf/localhost-rsa-chain.pem"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>

    Note 3: Although this approach may resolve the problem but since it is configured to use HTTP/1.1 instead of HTTP/2, you would not be able to take advantage of the benefits of using HTTP/2. 


    Related Articles:

     

     


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...