-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Olaf and Blake,
On 4/17/20 11:51, Olaf Kock wrote: > > On 17.04.20 16:55, Blake McBride wrote: >> I suppose, never mind. I created a startup listener that just >> does a System.exit(0) on contextDestroyed which is what I want - >> exit. >> >> Thanks. >> >> Blake >> >> >> On Fri, Apr 17, 2020 at 8:53 AM Blake McBride >> <blake1...@gmail.com> wrote: >> >>> Greetings, >>> >>> I am running vanilla tomcat 9.0.34 on a 64 bit Linux box. >>> Short of killall, I can't stop tomcat. I am trying >>> bin/shutdown.sh. Sure appreciate some help. > > The proper solution is in your log: > > "The web application [Kiss] appears to have started a thread named > [Thread-5] but has failed to stop it." > > If that's not a daemon thread, the JVM, by design, can't stop. > > Instead of calling System.exit(), do the right thing and implement > proper shutdown for all threads that the application starts on its > own. +1 > By the way: This behavior will keep the application from proper > redeployment. My recommendation: Correct your implementation rather > than nuking it from orbit. +1 Calling System.exit() will cause your (Blake's) application to take-down the JVM every time it stops. Maybe that's okay for the time being, but being able to deploy an updated version of your application without any downtime might be a desirable feature. - -chris >>> 17-Apr-2020 08:44:41.745 WARNING [main] >>> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThre ads >>> The web application [Kiss] appears to have started a thread >>> named [Thread-5] 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.aw ait(AbstractQueuedSynchronizer.java:2044) >>> >>> java.util.concurrent.LinkedBlockingDeque.takeFirst(LinkedBlockingDeq ue.java:492) >>> >>> org.kissweb.rest.QueueManager$Dispatcher.run(QueueManager.java:61) >>> java.lang.Thread.run(Thread.java:748) 17-Apr-2020 08:44:41.745 >>> WARNING [main] >>> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThre ads >>> The web application [Kiss] appears to have started a thread >>> named [pool-1-thread-1] 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.aw ait(AbstractQueuedSynchronizer.java:2044) >>> >>> java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.ja va:442) >>> >>> >>> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java: 1074) >>> >>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor .java:1134) >>> >>> >>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja va:624) >>> java.lang.Thread.run(Thread.java:748) 17-Apr-2020 08:44:41.749 >>> INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping >>> ProtocolHandler ["http-nio-8080"] 17-Apr-2020 08:44:41.750 INFO >>> [main] org.apache.coyote.AbstractProtocol.destroy Destroying >>> ProtocolHandler ["http-nio-8080"] >>> blake@i9-tower:~/intellijProjects/Kiss/tomcat/logs$ >>> > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl6dxxMACgkQHPApP6U8 pFjMwBAAl0Xh2yGJ5x+zpIXFUGhKY/laHdWq7mTXQiioPSpPwAuBKlScujtwWRBn 7eD/mdldJI/G+whyzmSSkxpo/oBpuxq9RL/SbtYrVk5u9XBgqB0ylQLUW/VnNo/0 D/jEKMrTtorn3hHEUeKqDPpmFdlbYOPTBkM/+Kl9DPZLGyLZCdhc9z7Bqcgrbf+V dghRxMC1PW2gZRT0xMrLKGdESf8hoN31x91uBEWeEtpNZEKy5pE37OaEZRjZIEg8 WbDJDTNQ+AhcPIWUsEyCPPD05SMoq5nk7QUb91nZzvvoA/EQ3kUutfOyWKf+Oq8V lSFOJyjcF9/d24/iMviZw1ILXuft/yvZObvkETCg0OnEmlCpBKAD3y+WCjbJi2fI 5Uff1T+w2zr2/Ml9f1WR3KLJKnA3rBK+SdmoDk/5ld2C++Dq31drCj4sVFcHQ4Pr WU8sbAbSZW99r6qKTJEfALu/DYYzRtQBWVD+ZOwCv00VS50Elf//N2Jx/5Xnoomx UwMpX83NbFT1AuTQfz99jSup8JSoKeYv78z9T0Fajn6Pjw3NLQpoyegI6l9NEKib zWV+BOCVgIZKdneBTd/+cTc2fW4Cg+SrxtXUrnCDtOyMKTGHrzoSuMb0UhcRD/D1 zz6aVNHVn4xRFwPf/oX+c67ZDIQRuweMAqxsYMLqGEvDLsPzqh8= =2Fvb -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org