Address already in use: make_sock: could not bind to address [::]:80

**********************************************************
处理办法:
# ps -aux | grep http
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root     12079 0.0 0.0 61164   720 pts/1    S+   16:06   0:00 grep http
# ps -aux | grep apache
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
apache   10820 0.0 0.0   2044   600 ?        Ss   Jan01   0:04 bash
root     12081 0.0 0.0 61160   716 pts/1    S+   16:06   0:00 grep apache
# kill -9 10820
# /etc/init.d/httpd start
Starting httpd:                                            [ OK ]
# /etc/init.d/httpd restart
Stopping httpd:                                            [ OK ]
Starting httpd:                                            [ OK ]
**********************************************************

 

httpd/Apache默认占用的是80端口,有时候你使用apache自带的重启脚本会出现

Address already in use: make_sock: could not bind to address [::]:80

Address already in use: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

Unable to open logs

这会导致你的apache无法启动,你需要查找下你的机器看看是否有哪个线程已经占用了80端口。

1
2
3
4
5
6
7
8
9
10
11
12
netstat -lnp|grep 80
 
#tcp    0   0 0.0.0.0:80    0.0.0.0:*   LISTEN  13957/httpd
 
#查看该进程 (13957是动态的)
ps 13975
 
#结束该进程
kill -9 13975
 
#启动httpd/Apache
service httpd start

apache启动完毕。

 

REF:

http://www.markdream.com/technologies/server/address-already-in-use-make_sock-could-not-bind-to-address-80.shtml

 

posted @   emanlee  阅读(2237)  评论(0编辑  收藏  举报
编辑推荐:
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
历史上的今天:
2014-05-01 Windows Tomcat 安装
2014-05-01 Windows JAVA 环境配置
2012-05-01 GenePix® Pro 文件格式
2010-05-01 听力技巧
点击右上角即可分享
微信分享提示