Tomcat报错,进程被占用

Tomcat报错

第一次使用CSDN,界面丑陋勿喷

Several ports (8005, 8080, 8009) required by Tomcat v7.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).

我在eclipse里配置了tomcat,用着好好的,突然就报错了,如上。第一次报错是这样的:
Server Tomcat v7.0 Server at localhost failed to start.
然后查了一下教程,在server视图窗口中把tomcat删除,然后再重新添加tomcat 之后再重新在启动web项目,就报了标题的错误。
解决方案如下:

1.打开dos,输入netstat -ano|findstr 8080,查看占用8080端口的进程,我这里的PID是10424
在这里插入图片描述
2.输入taskkill /pid 10424 /f,终止该进程
在这里插入图片描述
3.把tomcat重启一遍,再运行web项目就不会报错了

参考博客:
https://blog.csdn.net/kwc1314/article/details/79086519/
https://www.cnblogs.com/wuyudong/p/5626818.html

你可能感兴趣的:(报错解决方案)