Windows端口被占用解决方法
Error 场景
启动 Java 项目失败,控制台显示
Error starting ApplicationContext. To display the conditions report`re-run your application with 'debug' enabled.
***************************
APPLICATION FAILED TO START
***************************
Description:
The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured.
Action:
Verify the connector's configuration, identify and stop any process that's listening on port 8080, or configure this application to listen on another port.
解决方法
-
查看那些进程占用了我们的端口号
8080
打开 Windows 控制台,输入命令
netstat -nao | findstr "8080"
可以看到占用 8080
端口的进程 PID 为 8404
-
杀死相应进程:
在 Windows 控制台,继续输入命令
taskkill /pid 8404 /f
本文作者:于北往南
本文链接:https://www.cnblogs.com/GardenofEden/p/14577262.html
版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步