TomCat杀进程

有时候当你的tomcat启动时会发现 因为报以下的错误:

“Several ports ( 8080, 8009) required by Tomcat v6.0 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).”

"Several ports ( 8080, 8009) required by Tomcat v6.0 Server at localhost are already in use"  这句话什么意思呢?

这句话是说 Tomcat 服务的端口 8080 已经被占用。

这时候就要看一下是不是有哪个服务启动了。如果有服务启动,就尝试关闭它。 如果找不到的话

  ①  Win+R 键 打开运行窗口,输入cmd 启动 cmd小黑窗;

  ②  输入netstat -ano 查看进程 或者 netstat -ano | findstr 8080 查看8080进程;

  ③  找到8080端口对应的PID;

  ④  干掉这个进程  。输入 taskkill /F /PID +进程号                

      ex:干掉PID为1234的进程。输入: taskkill /F /PID 1234

这样进程就被干掉了。

原文地址:https://www.cnblogs.com/caixiaohua/p/6410197.html