关于IDea启动SpirngBoot项目,报错,遇到端口号被占用的问题
你会不会遇到下面所示的问题
org.apache.catalina.LifecycleException: Protocol handler start failed
Caused by: java.net.BindException: Address already in use: bind
Description:
The Tomcat connector configured to listen on port 10020 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 10000, or configure this application to listen on another port.
明明关于端口号10020的项目已经关闭,IDea只用一个项目在运行了。但是为什么还会报错呢?
怎么解决呢?
很简单,直接更换端口号,如图
这时候,就会有人问,要是不想更改端口号,没有别的解决方式呢
答案当然会有的
怎么解决呢
那就是杀死系统中占用端口号的进程
怎么杀死呢
第一步:Window+R输入cmd,进入命令行
第二步:
输入netstat -ano | findstr “端口号”
此步是为了查找那个进程在使用端口号
第三步:
输入taskkill -PID -F
pid为进程的id,如图所示
重新运行项目,完美解决,撒花。。。。。