项目开发过程中,常常会遇到一个问题,程序重新执行后报错如下,但是程序没跑起来啊,摸不着头脑。估计是跑着的程序跑到后台存起来了(瞎猜),遇到这个问题,我一般就是暴力给进程干掉。
网上已经有很多地方记录了这种方法,所以转载并记录一下自己的情况。
2024-01-24 05:01:01.966 ERROR 16824 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Web server failed to start. Port 8095 was already in use.
Action:
Identify and stop the process that's listening on port 8095 or configure this application to listen on another port.
Process finished with exit code 1
一、打开cmd Win+R 输入cmd 弹出命令提示符
二、找到“localhost:1098” 端口号占用情况
找到占用端口8005的进程号: netstat -ano | findstr "1098"
三、找到所有进程号为“272”的进程名
四、查看进程号对应的进程名
查看进程号对应的进程名: tasklist | findstr "272"
五、杀死进程
taskkill /pid 272 -f
</article>
转载自https://blog.csdn.net/sinat_38239454/article/details/115227032