본문 바로가기

Chapter01/프로젝트01

[ error ] Port 8080 was already in use.

 

오랜만에 만난 이 에러,,

본 김에 해결방법을 남겨보려고한다.

 

 

applicatin failed to start

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

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

Description:

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

Action:

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

 

 

말 그대로 포트가 이미 사용중이므로 웹서버를 시작할 수 없다는 에러이다.

방법은

 

다른 포트에 서비스를 띄우거나

사용할 포트에 실행중인 서비스를 죽이기 (넘 무서운가,,내리기?),, 인데

 

 

나는 후자의 경우이다. 

EC2 instance이고 Linux임 ! 

 

1.사용중인 포트 확인 (8090포트를 사용중인 프로세스 확인)

lsof -i :8090

 

2. 해당 프로세스 종료 (PID가 12345인 프로세스 종료)

kill -9 12345

 

 

 

실제로 아래를 보면 8090을 사용중인 프로세스를 강제 종료한 것.