Windows快速干掉一个占用的端口

Several ports (8005, 8080, 8009) required by Tomcat v5.5 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).

原因:端口8005, 8080, 8009被占用了。可能是在打开Tomcat的情况下关闭了Eclipse,或是Eclipse非正常关闭,导致先前的Tomcat没有被关闭,端口占用。或是其他软件占用了tomcat的端口号。

我的解决方案:

干掉占用端口的软件。

Win + R cmd

输入netstat -ano 或netstat -an | grep 8080 命令 就可以看到哪个进程占用了8080和8009端口,找到占用端口软件的PID,然后在任务管理器找到对应PID的软件,关闭结束该进程即可。

如果任务管理器中没有显示PID列,需要设置,查看 → 选择列 → 勾选PID。

找到之后 干掉它 重新启动 问题解决。


扫描二维码,在手机上阅读!

发表评论

电子邮件地址不会被公开。 必填项已用*标注