端口占用解决报错:Web server failed to start. Port 8080 was already in use.

报错信息如下:

Description:

Web server failed to start.Port 8080 was already in use.

Action:

Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.

当idea项目启动时报这个错,意思是端口 8080被占用>,解决办法有两个:

1.修改项目组的端口号

 先全局搜↓

port:

端口占用解决报错:Web server failed to start. Port 8080 was already in use._第1张图片

找到 8080并改为8081

# 开发环境配置
server:
  # 服务器的HTTP端口,默认为8080
  port: 8081

 2.关闭占用此端口号的服务

(以下为示例)

先键盘输入(win+r),在运行对话框中输入“cmd”进入DOS窗口:

再输入命令:

netstat -ano | findstr "8080"

找到占用8080端口的进程号4252

端口占用解决报错:Web server failed to start. Port 8080 was already in use._第2张图片

输入

tasklist|findstr "进程号"

回车得到占用8080端口的进程,一般为java.exe

 找到java.exe并手动结束

​​​​​​​端口占用解决报错:Web server failed to start. Port 8080 was already in use._第3张图片

 这时,再去重启就解决了

你可能感兴趣的:(报错问题,服务器,运维)