Linux 启动 Apache 时报错:(98)Address already in use: make_sock: could not bind to address [::]:80

Posted 你的踏板车要滑向哪里

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux 启动 Apache 时报错:(98)Address already in use: make_sock: could not bind to address [::]:80相关的知识,希望对你有一定的参考价值。

1. 启动 Apache 时报错:

[[email protected] sh]# service httpd start
Starting httpd: httpd: Could not reliably determine the server‘s fully qualified domain name, using localhost.localdomain for ServerName
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)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
                                                           [FAILED]

2. 查询到 80 端口被 nginx 占用:

[[email protected] sh]# netstat -tulnp | grep ":80"
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      1327/nginx

3. 找到 nginx 的进程号:

[[email protected] sh]# ps -ef | grep nginx
root      1327     1  0 11:35 ?        00:00:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
www       1329  1327  0 11:35 ?        00:00:00 nginx: worker process                                          
root      3902  1789  0 14:41 pts/0    00:00:00 grep --color=auto nginx

4. 杀掉进程:

[[email protected] sh]# kill -9 1327
[[email protected] sh]# kill -9 1329

5. 重新开启 Apache:

[[email protected] sh]# service httpd start
Starting httpd: httpd: Could not reliably determine the server‘s fully qualified domain name, using localhost.localdomain for ServerName
                                                           [  OK  ]

以上是关于Linux 启动 Apache 时报错:(98)Address already in use: make_sock: could not bind to address [::]:80的主要内容,如果未能解决你的问题,请参考以下文章

启动tomcat时报错 org.apache.coyote.http11.Http11AprPr...

独立运行Apache FtpServer 1.0.0启动时报错

tomcat启动时报错java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addFilter

debian Linux下 apache2 出错,不能启动,求助各位大侠

启动Hive时报错

linux下启动oracle监听时报错