Tomcat을 사용하며 접했던 에러와 이슈 정리
org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [scheduler-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(3, 50, 60, TimeUnit.SECONDS, blockingQueue);
try{
//code using thread
}catch(Exception e){
return false;
}
ThreadPoolExecutor 사용 후 종료를 하지 않아서 thread가 계속 남아있는 상태
-> 그래서 tomcat process 가 살아있었음
finally {
threadPoolExecutor.shutdown();
}
finally block에서 사용한 스레드풀을 정상 종료
org.apache.catalina.startup.Catalina stopServer
SEVERE: Error stopping Catalina
java.net.ConnectException: Connection refused (Connection refused)
tomcat이 실행되지 않는 상황에서 ./shutdown.sh 실행