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

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              ggautam Ganesh Gautam
              tmasutti Thiago Masutti
              Votes:
              10 Vote for this issue
              Watchers:
              21 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: