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

问题描述:

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端口了,就用运行程序了。

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值