启动SpringBoot项目,报错:

org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-8080]]
    ....

Caused by: org.apache.catalina.LifecycleException: Protocol handler start failed
    ....

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

错误描述:

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.

意思就是说8080端口一直被占用着,从而无法启动项目。此时很懵啊,因为本地并没有其他项目跑着…

解决

  1. cmd打开黑窗口,输入下面指令显示所有端口和PID进程ID

    netstat -ano
    
  2. 找到8080端口对应的PID,通过tasklist指令找到对应的进程

    tasklist | findstr "7676"
    
  3. 通过杀死此进程

    taskkill /f /t /im java.exe 
    

转载:https://blog.csdn.net/q343509740/article/details/80821409


Viva La Vida