I am running a web application using tomcat8 and jdk1.8 on a linux server.
When I shut down tomcat I get the following warning message:
WARNING [main] org.apache.tomcat.util.net.AbstractEndpoint.shutdownExecutor The executor associated with thread pool [http-apr-8080] has not fully shutdown. Some application threads may still be running
Note: I only get this warning when I shutdown tomcat, not when I undeploy my application.
How can I "fix" this warning so that the message won't appear. I do a thread dump using Jstack while the application is running and I see several http-apr-8080-exec threads.
Thank you
This error was caused as a result of shutting down tomcat while the instance was still "attached" to the Elastic Load Balancer.
The ELB has a feature called Connection Draining
which, by default, is set to 300 s.
You can disable connection draining or just remove the instance from the ELB before shutting down tomcat in order to not get the warning message.