Shutdown Tomcat got WARNNING: This is very likely to create a memory leak.

149 views
Skip to first unread message

He Vincent

unread,
Jul 30, 2021, 4:38:52 AM7/30/21
to CAS Community
step1:
I download completed new cas-overlay-template-5.3:
step 2: vi pom.xml
I just did one change: remove -tomcat since I will use external tomcat:
<app.server></app.server>
step 3: Build the cas.war
 ./build.sh clean
./build.sh package
./build.sh copy
Step 4: copy cas.war to tomcat
step 5: starttup tomcat
step 6: shutdown it after a few minutes
then I got the WARNING:

30-Jul-2021 16:29:33.895 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [cas] appears to have started a thread named [Thread-9] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.nio.fs.LinuxWatchService.poll(Native Method)
 sun.nio.fs.LinuxWatchService.access$600(LinuxWatchService.java:47)
 sun.nio.fs.LinuxWatchService$Poller.run(LinuxWatchService.java:314)
 java.lang.Thread.run(Thread.java:748)
30-Jul-2021 16:29:33.896 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [cas] appears to have started a thread named [config] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
 java.util.concurrent.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:492)
 java.util.concurrent.LinkedBlockingDeque.take(LinkedBlockingDeque.java:680)
 sun.nio.fs.AbstractWatchService.take(AbstractWatchService.java:118)
 org.apereo.cas.util.io.PathWatcherService.run(PathWatcherService.java:67)
 java.lang.Thread.run(Thread.java:748)
30-Jul-2021 16:29:33.958 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
30-Jul-2021 16:29:33.966 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["https-jsse-nio-9000"]
30-Jul-2021 16:29:33.970 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
30-Jul-2021 16:29:33.972 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["https-jsse-nio-9000"]


He Vincent

unread,
Jul 30, 2021, 4:46:54 AM7/30/21
to CAS Community, He Vincent
I have one more question, I have already set app.server etmpy, it seems that is still got embed tomcat:
<app.server></app.server>
jar tf ./target/cas.war|grep -i tomcat
WEB-INF/lib/spring-boot-starter-tomcat-1.5.18.RELEASE.jar
WEB-INF/lib/tomcat-embed-websocket-8.5.47.jar
WEB-INF/lib/tomcat-embed-core-8.5.47.jar
WEB-INF/lib/tomcat-embed-el-8.5.47.jar
WEB-INF/lib/tomcat-annotations-api-8.5.47.jar

And I can still run it directly:
$ java -jar ./target/cas.war

How can I build a clean cas.war without embed tomcat?  

Ray Bon

unread,
Jul 30, 2021, 11:17:59 AM7/30/21
to cas-...@apereo.org, vince...@gmail.com
Vincent,

I am using cas 6.3 and I see no reference to embedded tomcat.

Use the most recent version of cas and see what you get.

Ray

On Fri, 2021-07-30 at 01:46 -0700, He Vincent wrote:
Notice: This message was sent from outside the University of Victoria email system. Please be cautious with links and sensitive information.
Reply all
Reply to author
Forward
0 new messages