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.

        1. confluence-startup-check-img001.png
          510 kB
          Thiago Masutti
        2. confluence-startup-check-img002.png
          380 kB
          Thiago Masutti

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

            Renata Dornelas made changes -
            Remote Link Original: This issue links to "Page (Atlassian Documentation)" [ 522874 ]
            Conny Postma made changes -
            Remote Link Original: This issue links to "Page (Atlassian Documentation)" [ 479330 ]
            Ganesh Gautam made changes -
            Link New: This issue followed by CONFSRVDEV-34117 [ CONFSRVDEV-34117 ]

            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 ?
            Igor M. made changes -
            Remote Link New: This issue links to "Page (Atlassian Documentation)" [ 522874 ]
            Rachel Robins made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 515634 ]

            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 made changes -
            Fix Version/s New: 6.13.17 [ 92824 ]
            Fix Version/s Original: 6.13.16 [ 92793 ]

            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 .

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

                Created:
                Updated:
                Resolved: