localhost:8080 is already in use错误解决

错误信息: Error running ‘myserver’: Address localhost:8080 is already in use
Port 8080 required by Tomcat v8.0 Server at localhost is 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,进行web项目基础学习,运行web项目的时候会遇到 Error running Tomcat8: Address localhost:8080 is already in use 的错误,导致web项目无法运行。这明显是8080端口已经被占用,解决办法如下:

1.第一步

win+R打开window窗口,输入命令提示符号,执行命令:netstat -ano

在这里插入图片描述
可见,占用8080端口的进程的PID是47676。

2.第二步

执行命令:tasklist
在这里插入图片描述
在这里插入图片描述

从上图可以看出,占用端口的是javaw.exe

3.第三步

通过任务管理器,终止进程javaw.exe

通过快捷键ctrl+Alt+del或者ctrl+shift+esc打开任务管理器,找到javaw.exe,然后终止进程

在这里插入图片描述

4.第四步

重新启动tomcat,即可正常启动。

猜你喜欢

转载自blog.csdn.net/qq_45926254/article/details/129773953
今日推荐