Windows杀死进程的端口号

时间:2019-03-23 08:05:41

标签: windows spring-boot cmd port kill-process

我正在Spring Tool Suite IDE中使用嵌入式Tomcat服务器。我的问题是,当我运行项目时,出现如下错误,

***************************
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.

有一些类似的问题,但是没有一个答案对我不起作用。

2 个答案:

答案 0 :(得分:4)

  

解决方案1:

A simple solution is to terminate the process (in IDE) and clean and rebuild project.

  

解决方案2:

Change the port 
server.port=8088 # Server HTTP port.

  

解决方案3:

netstat -ano | findstr :<yourPortNumber>
taskkill /PID <typeyourPIDhere> /F

答案 1 :(得分:3)

我发现PatelRomil的答案对我不起作用。我通过运行发现了这一点

netstat -a -o -n

并获取端口的PID,然后运行:

taskkill /F /PID [PID]

为我工作。将[PID]替换为上一条命令中表中的值。