Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-58739

Configuring the Tomcat connector with a protocol different from NIO might cause a false warning about maximum HTTP thread size

      Issue Summary

      Configuring Confluence's Tomcat connector with a protocol different from Http11NioProtocol may cause the startup check to alert about the maxThreads attribute not being configured.

      Confluence may provide this warning in two different ways:

      1. In the UI with an error similar to the below.
        We discovered a problem while preparing to start Confluence. If you're a Confluence admin, you can either fix this problem now or ignore it, and start Confluence anyway.
        Tomcat: Your maximum HTTP Thread size is not configured. The recommended minimum size is 48.
        

      2. In atlassian-confluence.log with entries similar to the below.
        2019-08-16 18:22:32,103 WARN [localhost-startStop-1] [impl.util.tomcat.DefaultTomcatConfigHelper] getHttpConnector Expected exactly one HTTP connector in Tomcat configuration, but found []
        2019-08-16 18:22:32,117 WARN [localhost-startStop-1] [impl.util.tomcat.DefaultTomcatConfigHelper] getHttpConnector Expected exactly one HTTP connector in Tomcat configuration, but found []
        2019-08-16 18:22:32,237 WARN [localhost-startStop-1] [confluence.impl.health.DefaultHealthCheckRunner] logEvent Your maximum HTTP Thread size is not configured. The recommended minimum size is 48.
        2019-08-16 18:22:32,237 WARN [localhost-startStop-1] [confluence.impl.health.DefaultHealthCheckRunner] logEvent Your maximum HTTP Thread size is not configured. The recommended minimum size is 48.
        

      Steps to Reproduce

      1. Install a Confluence vanilla instance.
      2. Configure the default Tomcat connector to use the NIO2 protocol.
        <Connector port="26154" connectionTimeout="20000" redirectPort="8443"
           maxThreads="48" minSpareThreads="10"
           enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
           protocol="org.apache.coyote.http11.Http11Nio2Protocol"/>
        
      3. Restart Confluence.

      Expected Results

      Confluence starts properly and the startup health check identifies the Tomcat connector is properly configured with the expected maxThreads attribute.

      Actual Results

      Confluence starts and will log entries similar to the below in atlassian-confluence.log:

      2019-08-16 18:22:32,103 WARN [localhost-startStop-1] [impl.util.tomcat.DefaultTomcatConfigHelper] getHttpConnector Expected exactly one HTTP connector in Tomcat configuration, but found []
      2019-08-16 18:22:32,117 WARN [localhost-startStop-1] [impl.util.tomcat.DefaultTomcatConfigHelper] getHttpConnector Expected exactly one HTTP connector in Tomcat configuration, but found []
      2019-08-16 18:22:32,237 WARN [localhost-startStop-1] [confluence.impl.health.DefaultHealthCheckRunner] logEvent Your maximum HTTP Thread size is not configured. The recommended minimum size is 48.
      2019-08-16 18:22:32,237 WARN [localhost-startStop-1] [confluence.impl.health.DefaultHealthCheckRunner] logEvent Your maximum HTTP Thread size is not configured. The recommended minimum size is 48.
      

      Also, the following screen may appear in the UI while Confluence is being started.

      Notes

      After confirming the Tomcat connector is properly configured in server.xml, consider this warning as cosmetic and disregard it.
      This is caused because the startup health check code is looking for the HTTP string as the value to the protocol attribute.

      While using the Http11NioProtocol, then the value will indeed be HTTP.
      However, when using something different such as the NIO2, the value will not be HTTP and the startup health check will create the warning.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available.

            [CONFSERVER-58739] Configuring the Tomcat connector with a protocol different from NIO might cause a false warning about maximum HTTP thread size

            e495a4dfd4e3 This issue brought in fix for `Http11Nio2Protocol` while CONFSERVER-58097 addresses multiple connectors in server.xml. 

            The symptoms were similar where-in maxThreads warning is logged but the underlying reasons were different.

            cc: oshen@atlassian.com

            Ganesh Gautam added a comment - e495a4dfd4e3  This issue brought in fix for `Http11Nio2Protocol` while  CONFSERVER-58097  addresses multiple connectors in server.xml.  The symptoms were similar where-in maxThreads warning is logged but the underlying reasons were different. cc: oshen@atlassian.com

            Jeff Shepherd added a comment - - edited

            Is this fixed now in 7.12.3, per CONFSERVER-58097?

            Jeff Shepherd added a comment - - edited Is this fixed now in 7.12.3, per CONFSERVER-58097 ?

            Alex K added a comment -

            If you're running the Confluence 6.13 Enterprise release, a fix for this issue is now available in Confluence 6.13.17, which you can find in the Download Archives.

            Alex K added a comment - If you're running the Confluence 6.13 Enterprise release, a fix for this issue is now available in Confluence 6.13.17, which you can find in the Download Archives .

            Alex K added a comment -

            If you're running the Confluence 7.4 Enterprise release, a fix for this issue is now available in Confluence 7.4.5, which you can find in the Download Archives.

            Alex K added a comment - If you're running the Confluence 7.4 Enterprise release, a fix for this issue is now available in Confluence 7.4.5, which you can find in the Download Archives .

            Mark Benson added a comment - - edited

            Just upgraded from 7.6.2 to 7.7.2 in my test instance - still seeing this warning when the site first comes up post upgrade.
            Issue does not seem to be fixed...

            On further investigation I appear to be affected by CONFSERVER-58097 bug that is linked to this bug.

            Only reason I ended up was this the KB page:
            https://confluence.atlassian.com/confkb/startup-check-http-maxthreads-configuration-939930122.html?utm_source=Install&utm_medium=in-product&utm_campaign=csseng_fy18_q3_server_confluence_errorstate

            You might want to list CONFSERVER-58097 there as well otherwise it seems like the overall issue should be resolved.

            Mark Benson added a comment - - edited Just upgraded from 7.6.2 to 7.7.2 in my test instance - still seeing this warning when the site first comes up post upgrade. Issue does not seem to be fixed... On further investigation I appear to be affected by CONFSERVER-58097 bug that is linked to this bug. Only reason I ended up was this the KB page: https://confluence.atlassian.com/confkb/startup-check-http-maxthreads-configuration-939930122.html?utm_source=Install&utm_medium=in-product&utm_campaign=csseng_fy18_q3_server_confluence_errorstate You might want to list CONFSERVER-58097 there as well otherwise it seems like the overall issue should be resolved.

            A fix for this issue is available to Server and Data Center customers in Confluence 7.7.2
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Xinyi Xu (Inactive) added a comment - A fix for this issue is available to Server and Data Center customers in Confluence 7.7.2 Upgrade now or check out the Release Notes  to see what other issues are resolved.

            A fix for this issue is available to Server and Data Center customers in Confluence 7.6.2
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Xinyi Xu (Inactive) added a comment - A fix for this issue is available to Server and Data Center customers in Confluence 7.6.2 Upgrade now or check out the Release Notes to see what other issues are resolved.

            Hi damian.rosair1
            Sure we are looking forward to getting this fix in 7.4.x LTS release. We will update here once its backported.

            Ganesh Gautam added a comment - Hi damian.rosair1 ,  Sure we are looking forward to getting this fix in 7.4.x LTS release. We will update here once its backported.

            Damian Rosair added a comment - - edited

            Can this bug please be fixed/back-ported to a future 7.4.x version as well? We will be staying with the Enterprise/LTS versions and not upgrading to 7.6.2 or 7.7.x.

            This error was displayed after the upgrade from 6.15.9 to 7.4.1.

            Damian Rosair added a comment - - edited Can this bug please be fixed/back-ported to a future 7.4.x version as well? We will be staying with the Enterprise/LTS versions and not upgrading to 7.6.2 or 7.7.x. This error was displayed after the upgrade from 6.15.9 to 7.4.1.

            Ganesh Gautam added a comment - - edited

            charlie.misonne we have finished off the work for Http11Nio2Protocol. Can you please raise a separate issue for  org.apache.coyote.ajp.AjpNio2Protocol and we will look at it separately. 

            Thanks for bringing this into our notice.

            Ganesh Gautam added a comment - - edited charlie.misonne  we have finished off the work for Http11Nio2Protocol. Can you please raise a separate issue for  org.apache.coyote.ajp.AjpNio2Protocol and we will look at it separately.  Thanks for bringing this into our notice.

              ggautam Ganesh Gautam
              tmasutti Thiago Masutti
              Affected customers:
              10 This affects my team
              Watchers:
              21 Start watching this issue

                Created:
                Updated:
                Resolved: