启动Tomcat时端口号被占用的情况

来源:互联网 发布:教育部高校网络教育 编辑:程序博客网 时间:2024/05/26 08:43

Several ports (8005, 8080, 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).
这段英文相信大家都比较熟悉
这里写图片描述
这张图片也是令人讨厌的下面是我总结的第一种通用的解决方案
首先我们使用Window键+R键打开运行窗口,在运行窗口中输入cmd会弹出来一个黑色的窗口,在黑色的窗口中输入:

netstat -ano

这里写图片描述
这就是占用占用着三个端口号的进程信息, 最后面那个是系统分配的进行ID号 4248
接下来我们再次输入

netstat -aon|findstr "4248"

这样会列出所有进程ID都是4248的信息
这里写图片描述

tasklist|findstr "4248"

查找到对应的应用程序
这里写图片描述
我们再到任务管理器中结束进程就行了

0 0
原创粉丝点击