Maybe related to f4dac6846c548144799b1c3f33aba4eb320a3413.

Am 07.04.2021 um 13:53 schrieb Rainer Jung:
Hi there,

a colleague of mine observed a change in behavior starting with TC 9.0.38: until 9.0.37 the default server.xml with the connector protocol="HTTP/1.1", installed tcnative and attribute useAprConnector="true" for the AprLifecycleListener actually starts an APR connector as documented and expected:

INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8080"]

Same situation starting with 9.0.38 (and at least until 9.0.44):

INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]

I increased log level for a coupe of packages to FINEST and see the following differences during startup:

FINE [main] org.apache.tomcat.util.IntrospectionUtils.setProperty IntrospectionUtils: setProperty(class org.apache.catalina.core.AprLifecycleListener SSLEngine=on) FINE [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{Server/Listener} Setting property 'useAprConnector' to 'true' FINE [main] org.apache.tomcat.util.IntrospectionUtils.setProperty IntrospectionUtils: setProperty(class org.apache.catalina.core.AprLifecycleListener useAprConnector=true)
### ONLY ADDRESS DIFFERENCE
-FINE [main] org.apache.tomcat.util.digester.SetNextRule.end [SetNextRule]{Server/Listener} Call org.apache.catalina.core.StandardServer.addLifecycleListener(org.apache.catalina.core.AprLifecycleListener@383534aa) +FINE [main] org.apache.tomcat.util.digester.SetNextRule.end [SetNextRule]{Server/Listener} Call org.apache.catalina.core.StandardServer.addLifecycleListener(org.apache.catalina.core.AprLifecycleListener@136432db) FINE [main] org.apache.tomcat.util.IntrospectionUtils.callMethod1 IntrospectionUtils: callMethod1 org.apache.catalina.core.StandardServer org.apache.catalina.core.AprLifecycleListener org.apache.catalina.LifecycleListener FINE [main] org.apache.tomcat.util.digester.ObjectCreateRule.end [ObjectCreateRule]{Server/Listener} Pop org.apache.catalina.core.AprLifecycleListener
#### WRONG CLASS CHOSEN IN NEWER VERSIONS
-FINE [main] org.apache.tomcat.util.IntrospectionUtils.setProperty IntrospectionUtils: setProperty(class org.apache.coyote.http11.Http11AprProtocol port=8080) +FINE [main] org.apache.tomcat.util.IntrospectionUtils.setProperty IntrospectionUtils: setProperty(class org.apache.coyote.http11.Http11NioProtocol port=8080) FINE [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{Server/Service/Connector} Setting property 'protocol' to 'HTTP/1.1'
...

and after these lines the logs use consistenly APR versus NIO in the two versions. Both startup logs show the same

INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.27] using APR version [1.7.0]. 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 [true], useOpenSSL [true] INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1k  25 Mar 2021]

I didn't find an obvious reason in the changelog. Maybe an unwanted backport part from 10 or some startup order change.

I have not yet checked 8.5 etc.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to