You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've upgraded from Spring Boot 2.5.6 to Spring Boot 2.6.0 and noticed we are getting a new warning when using Tomcat with the Apache Tomcat Native library. This warning doesn't occur in 2.5.6.
2021-11-25 12:26:19.582 INFO 46736 --- [ main] com.example.demo.MainApplication : Starting MainApplication using Java 17 on darkstar with PID 46736 (/home/joguerra/Workspace/api-tester/demo/target/classes started by joguerra in /home/joguerra/Workspace/api-tester/demo)
2021-11-25 12:26:19.584 INFO 46736 --- [ main] com.example.demo.MainApplication : No active profile set, falling back to default profiles: default
2021-11-25 12:26:20.430 INFO 46736 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2021-11-25 12:26:20.438 INFO 46736 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-11-25 12:26:20.439 INFO 46736 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.55]
2021-11-25 12:26:20.440 WARN 46736 --- [ main] o.a.catalina.core.AprLifecycleListener : This listener must only be nested within Server elements, but is in [TomcatEmbeddedContext].
2021-11-25 12:26:20.440 INFO 46736 --- [ main] o.a.catalina.core.AprLifecycleListener : Loaded Apache Tomcat Native library [1.2.31] using APR version [1.7.0].
2021-11-25 12:26:20.440 INFO 46736 --- [ main] o.a.catalina.core.AprLifecycleListener : APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].
2021-11-25 12:26:20.440 INFO 46736 --- [ main] o.a.catalina.core.AprLifecycleListener : APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
2021-11-25 12:26:20.444 INFO 46736 --- [ main] o.a.catalina.core.AprLifecycleListener : OpenSSL successfully initialized [OpenSSL 1.1.1l 24 Aug 2021]
2021-11-25 12:26:20.500 INFO 46736 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-11-25 12:26:20.500 INFO 46736 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 873 ms
2021-11-25 12:26:20.829 INFO 46736 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2021-11-25 12:26:20.836 INFO 46736 --- [ main] com.example.demo.MainApplication : Started MainApplication in 1.546 seconds (JVM running for 1.878)
Example minimal application:
package com.example.demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class MainApplication {
public static void main(String[] args) {
SpringApplication.run(MainApplication.class, args);
}
}
wilkinsona
changed the title
Warning from AprLifecycleListener in Spring Boot 2.6.0 when using Tomcat Native
Warning from AprLifecycleListener when using Tomcat Native and Tomcat 9.0.55 or later
Nov 25, 2021
Thanks for the report. The warning's due to a change in Tomcat 9.0.55. It's benign as Boot only has a single Context. Nevertheless, we should avoid it being logged by moving the listener to the Server.
Thanks for the report. The warning's due to a change in Tomcat 9.0.55. It's benign as Boot only has a single Context. Nevertheless, we should avoid it being logged by moving the listener to the Server.
This is the outcome of #28472. You will have two distinct contexts when Actuator is on. Although it is not clear to me why it must create two Tomcat instances at all. Imho, one instances with two Servces should be enough.
We've upgraded from Spring Boot 2.5.6 to Spring Boot 2.6.0 and noticed we are getting a new warning when using Tomcat with the Apache Tomcat Native library. This warning doesn't occur in 2.5.6.
Example minimal application:
POM:
The text was updated successfully, but these errors were encountered: