简体   繁体   English

无法启动 httpd 服务器:地址已被使用

[英]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 
  1. Files defined inside conf.d would have Listen port as 80 along with repetitive declaration of Listen port in httpd.conf which can cause this issue.在 conf.d 中定义的文件会将侦听端口设为 80,并在 httpd.conf 中重复声明侦听端口,这可能会导致此问题。
  2. Seems port 80 is used by some other process, it can be checked by "netstat -anp|grep :80" Or assign a new available port to the Listen directive in httpd.conf and restart httpd.似乎端口 80 被某些其他进程使用,可以通过“netstat -anp|grep :80”检查或为 httpd.conf 中的 Listen 指令分配一个新的可用端口并重新启动 httpd。

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.

相关问题 systemctl restart httpd 启动失败 Apache HTTP 服务器 httpd pid 已经运行 - systemctl restart httpd Failed to start The Apache HTTP Server httpd pid already running Apache httpd:bind:地址已在使用中 - Apache httpd:bind:Address already in use Apache2:尝试启动它时“地址已在使用中”(“ httpd.pid”问题?) - Apache2: “Address already in use” when trying to start it ('httpd.pid' issue?) 绑定失败:地址已在使用中 - Bind failed: Address already in use 地址已在使用中(绑定失败) - Address already in use (bind failed) 由于地址已在使用中,dovecot 无法启动 - dovecot unable to start due to address already in use 无法启动红隼。 System.IO.IOException:无法绑定到地址 http://127.0.0.1:5000:地址已在使用中 - Unable to start Kestrel. System.IO.IOException: Failed to bind to address http://127.0.0.1:5000: address already in use “searchd”显示“FATAL:bind()在0.0.0.0上失败:地址已在使用中” - “searchd” is showing “FATAL: bind() failed on 0.0.0.0: Address already in use” Spring boot.jar to digital ocean droplet (Linux Ubuntu):Web 服务器启动失败。 80 端口已被使用 - Spring boot .jar to digital ocean droplet (Linux Ubuntu) :Web server failed to start. Port 80 was already in use 服务器重启后无法启动 Apache HTTPD - Unable to start Apache HTTPD after server reboot
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM