When running the project, I get: Web server failed to start. Port 8888 was already in use. Error

The following error message appears when running the project in idea:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-03-02 11:15:03.866 ERROR 10600 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   :

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

Description:

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

Action:

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

Cause Analysis : Port 8888 is occupied

Solution : Kill the process using port 8888

(1) Open cmd as an administrator: enter netstat -ano
to view the started process ID

insert image description here

(2) View the Pid of port 8888:
insert image description here
(3) Kill the pid of the process: task kill /F /pid PID
Note: PID is the ID of the process

insert image description here
Restart the project and the project works fine:

insert image description here

Guess you like

Origin blog.csdn.net/Matcha_ice_cream/article/details/123227028