본문 바로가기
OS & Server/Windows

이미 사용중인 포트 프로세스 확인 및 제거

by 주리니e 2022. 7. 5.
728x90

이미 사용중인 포트 프로세스 확인 및 제거

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.7.1)

2022-07-05 11:24:59.227  INFO 9632 --- [           main] kr.co.urlrewrite.UrlrewriteApplication   : Starting UrlrewriteApplication using Java 11 on PC with PID 9632 (D:\development\workspace_java11\urlrewrite\bin\main started by user in D:\development\workspace_java11\urlrewrite)
2022-07-05 11:24:59.229  INFO 9632 --- [           main] kr.co.urlrewrite.UrlrewriteApplication   : No active profile set, falling back to 1 default profile: "default"
2022-07-05 11:24:59.737  INFO 9632 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2022-07-05 11:24:59.738  INFO 9632 --- [           main] o.a.catalina.core.AprLifecycleListener   : An older version [1.2.23] of the Apache Tomcat Native library is installed, while Tomcat recommends a minimum version of [1.2.30]
2022-07-05 11:24:59.738  INFO 9632 --- [           main] o.a.catalina.core.AprLifecycleListener   : Loaded Apache Tomcat Native library [1.2.23] using APR version [1.7.0].
2022-07-05 11:24:59.738  INFO 9632 --- [           main] o.a.catalina.core.AprLifecycleListener   : APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [false].
2022-07-05 11:24:59.738  INFO 9632 --- [           main] o.a.catalina.core.AprLifecycleListener   : APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
2022-07-05 11:24:59.740  INFO 9632 --- [           main] o.a.catalina.core.AprLifecycleListener   : OpenSSL successfully initialized [OpenSSL 1.1.1c  28 May 2019]
2022-07-05 11:24:59.746  INFO 9632 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2022-07-05 11:24:59.746  INFO 9632 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.64]
2022-07-05 11:24:59.836  INFO 9632 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2022-07-05 11:24:59.836  INFO 9632 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 580 ms
2022-07-05 11:25:00.066  WARN 9632 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.server.PortInUseException: Port 8080 is already in use
2022-07-05 11:25:00.068  INFO 9632 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2022-07-05 11:25:00.069  INFO 9632 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: destroy called
2022-07-05 11:25:00.076  INFO 9632 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-07-05 11:25:00.086 ERROR 9632 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Web server failed to start. Port 8080 was already in use.

Action:

Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.

개발 중 Spring Boot 실행 시 이전 프로세스가 정상적으로 종료되지 못하고  8080 포트가 이미 사용중이라고 나오는 경우가 있다.

 

 

  • 8080포트 사용중인 PID 찾기
netstat -ano | findstr :8080

 

  • PID로 사용중인 파일 찾기
tasklist | findstr 856

 

  • PID로 사용중인 프로세스 죽이기
taskkill /f /pid 856

 

728x90

댓글