解决80端口占用Identify and stop the process that‘s listening on port 80 or configure this application

解决80端口占用Identify and stop the process that‘s listening on port 80 or configure this application

再度Miren
2022-05-16 / 0 评论 / 10 阅读 / 正在检测是否收录...


问题描述:

Description:

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

Action:

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

报错的大致意思就是 80端口被占用,确定并停止正在端口80上侦听的进程,或将此应用程序配置为在另一个端口上侦听。

运行环境:

在ide运行springcloud程序,需要使用80端口在zookeeper注册服务

解决方法:

方法一:修改我们要使用的端口

在程序的配置文件application.yml 把80改为8080

server:
  port: 8080

方法二:找出占用的进程,取消占用

1)win+R 输入cmd 打开
2)在窗口输入
netstat -aon|findstr "80"

可以看到是被PID为4的进程占用
在这里插入图片描述

3)在窗口输入 taskkill /pid 4 -f

在这里插入图片描述
无法关闭进程

4)80端口被system(pid=4)占用的解决方法

经过百度查询原文 作者:C4rpeDime
发现这80端口的确是 SQL Server 2008 里面的组件——SQL Server Reporting Services (MSSQLSERVER)。是 SQL Server 的日志系统,占用了80端口,
关闭方法:
1.win+R 输入services.msc 打开服务
在服务中找到
在这里插入图片描述
将其停止

再次执行netstat -aon|findstr “80” 就会发现没有进程占用80端口了,就用运行程序了。


0

评论 (0)

取消