Caused by: java.net.BindException: Address already in use: bind

一 、报错原因

        启动IDEA后报错如下

Caused by: java.net.BindException: Address already in use: bind_第1张图片

Caused by: java.net.BindException: Address already in use: bind_第2张图片         根据最后报错分析:tomcat端口80被占用,那就把占用的端口干掉

二 、查看进程及端口

        win + r 输入 cmd 进入控制台

 2.1 查看所有端口

netstat -ano 

Caused by: java.net.BindException: Address already in use: bind_第3张图片

2.2 查看某个端口

netstat -ano | findstr  端口号(查看你被占用的端口号)

示例:netstat -ano | findstr 80

Caused by: java.net.BindException: Address already in use: bind_第4张图片

2.3 强制关闭

 taskkill -PID 进程号 -F

 强制关闭端口号后,重新启动项目

Caused by: java.net.BindException: Address already in use: bind_第5张图片

ok,成功解决! 

你可能感兴趣的:(踩坑与思考,intellij-idea,java,ide,spring,boot,tomcat)