关于80端口被占用的解决方案(含系统组件)

博客围绕解决Http.sys与Apache端口冲突展开。指出Http.sys使用端口80,会阻止Apache使用该端口。提供解决思路,先通过特定步骤获取使用Http.sys的应用程序信息,再禁用Http.sys,还给出了具体操作步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

适用于 Windows 操作系统中所有端口被占用的情况。
 
IntelliJ IDEA 的终端端口中,或在操作系统的 CMD 命令提示符窗口中输入以下命令:
netstat -ano |findstr 80
以上命令最后的 80 表示查找端口使用情况中与 80 这个数字相关的记录,如果是其它端口被占用,则命
令的 80 换成其它端口号。
当执行成功后,在结果的列表中找出占用 80 端口的进程的 ID ,例如以下结果中,占用 80 端口的
PID Process ID )就是 14788

然后,在任务管理器中找到 14788 对应的进程(如果使用的是 Windows 7 操作系统,在任务管理器的菜
 
单中的 查看 菜单中 选择列 并勾选 PID 即可),将该进程直接终止即可:
 

 

如果在终端或 CMD 窗口中根本不识别 netstat 命令,需要将 C:\Windows\System32 这个路径配置到系
统的环境变量 PATH 中,然后,重启 IntelliJ IDEA CMD 窗口再执行!
 
 
 
 
 
关于系统组件被System进程占用的情况,进程无法结束:

 

 
把这个截图问老师的时候,老师怀疑是iis的问题我大致搜了一下发现并不是:
IIS说的是互联网信息服务,全名:Internet Information Services。是微软提供的基于运行Windows的互联网基本服务基本的windows版本都支持IIS配置,XP,win8等家庭版的IIS一般只够支持开发等小团队使用。windows服务版支持发布站点使用。
 
 
不是的话就可能是http.sys:

微软社区提供有这些资料,所以我们的解决思路是禁用http.sys。

I work on Http.sys technology at Microsoft and somebody sent me a link to this blog. I am a bit surprised by this behavior you are seeing on Windows7 Beta and with some help from you, I will like to find out the root cause of this issue so that we can take the appropriate action if needed.

You are right, Http.sys uses port 80. It is the driver component for httpapi, the server http stack (You can find more info on this technology at http://msdn.microsoft.com/en-us/library/aa364434(VS.85).aspx ). In your case, some application is running which is using http.sys to listen on port 80. This is preventing Apache from using port 80. We offer a mechanism for applications to help control port sharing but I’ll need to look into the specific application that’s causing you this conflict. If you can give us the output of following command “netsh http show servicestate”, then it will allow me to find out which application is using http.sys. Since you have disabled http.sys, please follow these steps listed below before running the command:

1. sc config http start= demand

2. Reboot

3. Run the command (netsh http show servicestate) as administrator

After you have run this command, you can disable http.sys as follows:

1. net stop htt

2. Sc config http start= disabled

Please let me know if you face any issues in the process.

Thanks,

Niranjan

某道翻译为:

我在Http工作。微软的sys技术,有人给我发了一个这个博客的链接。我对你在Windows7测试版上看到的这种行为感到有点惊讶,在你的帮助下,我想找出这个问题的根本原因,以便我们可以采取适当的行动,如果需要的话。你说得对,Http。sys使用端口80。它是httpapi的驱动组件,服务器http堆栈(您可以在http://msdn.microsoft.com/en-us/library/aa364434(VS.85).aspx上找到更多关于这项技术的信息)。在您的例子中,一些应用程序正在使用http运行。sys监听端口80。这将阻止Apache使用端口80。我们提供了一个机制的应用程序,以帮助控制端口共享,但我将需要调查的具体应用程序,导致你这个冲突。如果您能给我们以下命令netsh http show servicestate的输出,那么它将允许我找出哪个应用程序正在使用http.sys。因为您已经禁用了http。在运行命令之前,请遵循下面列出的步骤:sc配置http start=需求2。重启3。以管理员身份运行命令(netsh http show servicestate)运行此命令后,可以禁用http。系统如下:1。net stop htt 2。如果你在这个过程中遇到任何问题,请让我知道。谢谢,Niranjan

 
 
 
 
 
如果您有更好、更多的解决办法或其他问题欢迎在下方评论交流!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值