[英]Failed to start httpd server: Address already in use
Surely I know that same question is already posted here.我当然知道这里已经发布了同样的问题。 However, when I searched it, the status is different from mine and I cannot understand the answers.但是,当我搜索它时,状态与我的不同,我无法理解答案。 Therefore I post my problem here.因此,我在这里发布我的问题。 Sorry for duplicating issues.抱歉重复问题。
My homepage suddenly doesn't work and I found out that it failed to start httpd service.我的主页突然不工作,我发现它无法启动httpd服务。 Following image is the result when I command 'sudo service httpd start'下图是我命令“sudo service httpd start”时的结果
Starting httpd: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down AH00015: Unable to open logs [FAILED]启动 httpd: (98)Address already in use: AH00072: make_sock: 无法绑定到地址 [::]:80 (98)Address already in use: AH00072: make_sock: 无法绑定到地址 0.0.0.0:80 无监听套接字可用,正在关闭 AH00015:无法打开日志 [失败]
restart doesn't work also.重启也不起作用。
$ sudo service httpd restart $ sudo service httpd 重启
Stopping httpd: [FAILED]停止 httpd:[失败]
Starting httpd: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down AH00015: Unable to open logs [FAILED]启动httpd: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 no listen套接字可用,正在关闭 AH00015:无法打开日志 [失败]
What should I do to restart httpd service and revive my homepage?我应该怎么做才能重新启动 httpd 服务并恢复我的主页?
Error 98 usually occurs when some webserver is using the port, here 80, or The clean release port/address was not done.错误 98 通常发生在某些 Web 服务器正在使用端口时,这里是 80,或者没有完成干净的释放端口/地址。
If port is being used by other webserver, shutdown the server.如果其他网络服务器正在使用端口,请关闭服务器。 You can find out which service is using port 80 by您可以通过以下方式找出哪个服务正在使用端口 80
netstat -pan |grep 80
and then shutdown the service.然后关闭服务。
If the port was not released upon unclean shutdown of server, then如果在服务器非正常关闭时端口没有被释放,那么
sudo service networking restart
to release address/port combination from bind.从绑定中释放地址/端口组合。 This usually fixes error 98 for me.这通常会为我修复错误 98。
I have the same problem.我也有同样的问题。 So i looked to netstat:所以我看了一下netstat:
sudo netstat -tulpn | grep :80
and received:并收到:
tcp6 0 0 :::80 :::* LISTEN 7836/docker-proxy
after killing process:杀死进程后:
sudo kill 7836
Your httpd
server is already started.您的httpd
服务器已经启动。 Try restarting the service instead of starting it again:尝试重新启动服务而不是再次启动它:
sudo service httpd restart
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.