Copy link to clipboard
Copied
I am unable to cleanly shutdown Tomcat 9.0.76 using shutdown.bat with ColdFusion 2021 Update 7 EE (at the ROOT) on Windows 10. ColdFusion seems to shutdown ok, but Tomcat reports problems with a thread failing to be removed when the application (ColdFusion - ROOT) is stopped:
=====START OF SHUTDOWN LOG===
13-Jul-2023 08:41:41.671 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.
13-Jul-2023 08:41:41.672 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
13-Jul-2023 08:41:42.237 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
13-Jul-2023 08:41:47.390 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2b01be54]) and a value of type [org.apache.xerces.jaxp.SAXParserFactoryImpl] (value [org.apache.xerces.jaxp.SAXParserFactoryImpl@14997cb9]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
13-Jul-2023 08:41:47.391 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [org.apache.axis.utils.XMLUtils.ThreadLocalDocumentBuilder] (value [org.apache.axis.utils.XMLUtils$ThreadLocalDocumentBuilder@1641dfb3]) and a value of type [org.apache.xerces.jaxp.DocumentBuilderImpl] (value [org.apache.xerces.jaxp.DocumentBuilderImpl@49620576]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
13-Jul-2023 08:41:47.392 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3397c8c0]) and a value of type [org.apache.xerces.jaxp.SAXParserImpl] (value [org.apache.xerces.jaxp.SAXParserImpl@22b581a5]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
13-Jul-2023 08:41:47.396 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2b01be54]) and a value of type [org.apache.xerces.jaxp.SAXParserFactoryImpl] (value [org.apache.xerces.jaxp.SAXParserFactoryImpl@3c2188b0]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
13-Jul-2023 08:41:47.398 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3397c8c0]) and a value of type [org.apache.xerces.jaxp.SAXParserImpl] (value [org.apache.xerces.jaxp.SAXParserImpl@9751c9]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
13-Jul-2023 08:41:47.411 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
13-Jul-2023 08:41:57.414 WARNING [main] org.apache.tomcat.util.net.Acceptor.stop The acceptor thread [http-nio-8080-Acceptor] did not stop cleanly
13-Jul-2023 08:41:57.418 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
=====END OF SHUTDOWN LOG===
Any thoughts regarding if this can be fixed? It hangs and I have to manually close the Tomcat window/process.
Copy link to clipboard
Copied
To be clear, the messages about org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks are very normal. Nothing to worry about.
As for your challenge, you're saying that all is otherwise the same other than having applied the update? You always stop cf with shutdown.bat? Or you're trying it only because the windows services stop is not working?
As for the update, how did you apply it? In the cf admin or via the command line?
And have you checked the update log? It should show "0 fatalerrors". Does it? More at https://www.carehart.org/blog/2016/9/6/solve_common_problems_with_CF_updates_in_10_and_above
Let's hear these answers before digging further.
Copy link to clipboard
Copied
Thanks for responding Charlie.
I did not install Tomcat as a Windows service, just unzipped and use startup.bat and shutdown.bat. NOTE that I did have to change the shutdown port from 8005 to 8006 because a Windows system process has claimed port 8005. But, prior to installing CF, startup and shutdown were clean. It isn't a big deal, but I'm wondering if it might be an indication of underlying problems that may surface later.
I applied update 7 to the base CF 2021 install using the command line and JDK 11 Java.
From the Update 7 install log (cfusion\hf-updates\hf2021-00007-330142\Adobe_ColdFusion_2021_Update_7_Install_07_11_2023_17_11.log):
Installation: Successful.
1355 Successes
0 Warnings
0 NonFatalErrors
0 FatalErrors
For now, I'm going to ignore the shutdown issue and move on to configuring our CF apps and then check if they work.
Thanks for your help!
Carl
Copy link to clipboard
Copied
My answer is not very sophisticated. But I recommend you just use the normal shutdown process to kill Tomcat after you're done with it, and not worry about any errors that happen after CF has already shut down.
Dave Watts, Eidolon LLC
Find more inspiration, events, and resources on the new Adobe Community
Explore Now