做
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
程式,就可以啟動成功了!
如果本篇部落格對您有一定的幫助,大家記得留言+點贊+收藏哦。
我是阿晨,在技術的道路上我們一起砥砺前行!