Uploaded image for project: 'JBoss Web Server'
  1. JBoss Web Server
  2. JWS-737

Tomcat no longer defaults to using the Http11AprProtocol when tomcat-native is installed

XMLWordPrintable

    • 3
    • Documentation (Ref Guide, User Guide, etc.), Migration, User Experience
    • Hide
      $ yum install jws4-tomcat-native jws4-tomcat
      $ systemctl start jws4-tomcat
      # Check logs for the following and note that nio is used instead of APR by default
      INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.library.path=/opt/rh/jws4/root/usr/lib64
      INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.12 using APR version 1.5.2.
      INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
      INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
      INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.2h-fips  3 May 2016)
      INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
      
      Show
      $ yum install jws4-tomcat-native jws4-tomcat $ systemctl start jws4-tomcat # Check logs for the following and note that nio is used instead of APR by default INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.library.path=/opt/rh/jws4/root/usr/lib64 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.12 using APR version 1.5.2. INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.2h-fips 3 May 2016) INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]

      I noticed while converting tomcat-native to an SCL package that even though tomcat loads tcnative into memory it doesn't default to using Http11AprProtocol anymore (when protocol="HTTP/1.1" is used) . Instead it's setup to use OpenSSL/NIO instead of APR because it is more reliable and more beneficial for users.

      We should document this change so that when users upgrade they're aware that APR needs to be explicitly configured.

      To re-enable the behavior from previous versions (default to APR, if available), users can set useAprConnector="true" on the AprLifecycleListener defined in the server.xml and restart.

              tkelly@redhat.com Tyler Kelly (Inactive)
              rhn-support-csutherl Coty Sutherland
              Marek Czernek Marek Czernek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: