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).
以上是启动Tomcat时提示的报错信息,提示信息来看,顾名思义,是因为server.xml中配置的Tomcat服务器端口被占用,其实是因为服务已经启动了,这时候不得不通过dos命令强制结束掉运行中的进程,具体操作如下。
1、在dos下,输入 netstat -ano|findstr 8080 查看启动的进程。
//查看占用8080端口的进程,显示占用端口的进程
2、 结束进程:taskkill /pid 1952 /f 。
//运行windows自带taskkill命令,将上面显示的进程号,结束掉。