Several ports (8005, 8009) required by Tomcat v8.0 Server at localhost are already in use.
发布者:IT人在线 | 发表时间:2018/9/15 13:53:59
运行tomcat时出现以下错误:
Several ports (8005, 8009) required by Tomcat v8.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). |
这是因为其他程序占用了8080端口导致的错误
解决方法:
打开任务管理器,找到java虚拟机相关的进程javaw.exe,将它结束掉。如果问题没有解决,往下看。
如果没有这个进程,那可能是其他软件占用了端口。
在开始菜单->运行->cmd->输入 netstat -ano 或netstat -an | grep 8080 命令,可以查看哪个进程占用了8080和8009端口,找到占用端口软件的PID,然后在任务管理器找到对应PID的软件,关闭结束该进程即可。如果任务管理器中没有显示PID列,需要设置,查看---》选择列---》勾选“PID(进程标识符)”。