Java, IntelliJ/Spring

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

고로케 2021. 6. 25.
반응형

포트가 이미 실행 중일 때 스프링을 Run 하면 아래처럼 나온다

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.
2021-06-25 18:11:01.114  INFO 8996 --- [           main] o.s.s.concurrent.
ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'

또는

Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.2.0.RELEASE:run 
(default-cli) on project babyfoodchef: 
Application finished with
exit code: 1


해결법

- 명령 프롬포트(CMD) 실행

netstat -ano 입력 엔터

해당 포트인 8080번 포트의 PID를 종료 시켜주면 된다.

다음과 같이 입력 (pid값은 저랑 다릅니다) 

taskkill /pid 19156 /f

 

이제 다시 spring 실행하면 된다.

 

 

반응형

댓글