报错信息提示内容及图片如下:
'Starting Tomcat v9.0 Server at localhost' hasencountered a problem.
Several ports (8005, 8080) required by Tomcatv9.0 Server at localhost are already in use. Theserver may already be running in anotherprocess, or a system process may be using theport. To start this server you will need to stopthe other process or change the portnumber(s).
解决方案如下:
1.点击屏幕左下角的“开始”按钮--搜索命令提示符--右键以管理员身份运行(以管理员身份进入防止权限问题的错误)--输入cmd回车进入命令行窗口,输入netstat -ano,回车,查看所有端口的使用情况
netstat -ano
2.找到TCP端口号为8080、8005端口后面对应的数字(一般这里8080、8005端口号对应的数字是一样的,我这里是2224)
3.然后输入netstat -aon | findstr 8080(8005)找到8005和8080端口及对应的PID值
netstat -aon | findstr 8080(8005)
4.结束端口进程
taskkill /pid 进程号 /f (进程号是PID值),例如上图中显示是2224,进程号就写2224即可
taskkill /pid 2224 /f
5.重新启动
启动成功,问题解决!