JaPark Bug World

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

bug world/SpringBoot Error

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

JAstory 2024. 4. 12. 10:27

***************************
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.


Process finished with exit code 1

 

스프링부트 공부중인데 스프링부트 서버를 재실행 시 간헐적으로 실행이 안되는 경우가 있다. 검색해보니 이미 8080 포트가 사용중이여서 발생하는 이슈이다. 실행중인 프로세스를 종료 시키고 재실행 해야 한다. (참고로 mac 유저이다.)

 

터미널 > lsof -i tcp:8080

COMMAND 에 보면 java로 실행중인 프로세스가 표시되는데 2개다.. PID로 표시되는 포트를 중지 시켜준다.

 

터미널 > sudo kill -9 1713