skill/Linux

Port 8080 is already in use 톰캣 프로세스 종료 처리 해결

have a nice day :D 2021. 6. 12. 14:25
반응형
2021-05-12 09:21:56.949 DEBUG 7800 - [ restartedMain ] o.s.b.d.LoggingFailureAnalysisReporter - (LoggingFailureAnalysisReporter.java:37) report: Application failed to start due to an exception

org.springframework.boot.web.server.PortInUseException: Port 8080 is already in use

at org.springframework.boot.web.server.PortInUseException.lambda$throwIfPortBindingException$0(PortInUseException.java:70)

at org.springframework.boot.web.server.PortInUseException.lambda$ifPortBindingException$1(PortInUseException.java:85)

at org.springframework.boot.web.server.PortInUseException.ifCausedBy(PortInUseException.java:103)

at org.springframework.boot.web.server.PortInUseException.ifPortBindingException(PortInUseException.java:82)

at org.springframework.boot.web.server.PortInUseException.throwIfPortBindingException(PortInUseException.java:69)

tomcat 사용 시, 가끔 소스가 반영 안되어, 헤매는 경우가 있죠.~

분명히 재 기동 했는데, 왜! 계속 에러야~ 수정했는데.!! 

정상 기동되었다고 확신하고, 끝까지 로그를 안본 탓입니다ㅠ 화면만 무한 refresh 하고 있죠.ㅠ

그러다가 기동 로그 확인하면, already in use... 허허허.. 내가 수정한 소스가 반영이 안되었었군..ㅠ

그럼 기존 톰켓 프로세스를 종료 후 재 기동 하면 됩니다.

톰캣 프로세스 확인

IRUPLACE-MacBookPro:~ iruplace$ ps -ef | grep tomcat

  501  7018     1   0  7:24PM ??         0:28.98 /Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk/Contents/Home/bin/java -Ddebug -XX:TieredStopAtLevel=1 -noverify -Dspring.devtools.restart.trigger-file=.restartTriggerFile -Dspring.output.ansi.enabled=always -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=53234:/Applications/IntelliJ IDEA.app/Contents/bin -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dfile.encoding=UTF-8 -classpath

톰캣 프로세스 종료

IRUPLACE-MacBookPro:~ iruplace$ kill 7018

굵은 표시 부분이 pid 입니다. kill 시키면, 톰캣 프로세스 종료.!

톰캣 프로세스 확인

IRUPLACE-MacBookPro:~ iruplace$ ps -ef | grep tomcat

501  7811  7788   0  9:44AM ttys000    0:00.00 grep tomcat

반응형