做
Web
开发的小伙伴,常常会遇到端口占用的问题,例如
2021-07-26 18:01:58.831 ERROR 6492 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Web server failed to start. Port 8083 was already in use.
Action:
Identify and stop the process that's listening on port 8083 or configure this application to listen on another port.
此时怎么解决呢?
1、找到端口占用的进程
> netstat -ano | findstr "8080"
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 4772 # 记住该进程号
TCP 192.168.2.47:51882 183.3.235.67:8080 ESTABLISHED 26168
TCP 198.18.0.1:51875 59.36.121.194:8080 ESTABLISHED 5208
TCP [::]:8080 [::]:0 LISTENING 4772
记住占用端口的进程号,例如本文中是
4772
2、杀死该进程
接下来,重启
Spring
程序,就可以启动成功了!
如果本篇博客对您有一定的帮助,大家记得留言+点赞+收藏哦。
我是阿晨,在技术的道路上我们一起砥砺前行!