1:Java Springboot 项目8888端口被占用,提示如下
***************************
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.
2020-11-09 09:25:50.968 INFO 141756 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
处理方式
首先,查找8888端口被哪个进程占用,cmd输入如下命令
netstat -ano | findstr 8888
结果如下
TCP 0.0.0.0:8888 0.0.0.0:0 LISTENING 142108
TCP [::]:8888 [::]:0 LISTENING 142108
TCP [::1]:8888 [::1]:55091 TIME_WAIT 0
右上可见是被142108进程占用。
随后,使用如下命令第一行中止该进程。
taskkill /F /pid 142108
SUCCESS: The process with PID 142108 has been terminated.
系统会给出成功提示。
注意:将8888,142108改成你自己的端口号和PID进程号。