我正在使用centos7当我重新启动httpd服务
systemctl restart httpd.service
它告诉我这个错误。
-- Logs begin at Tue 2015-04-07 22:25:29 UTC, end at Tue 2015-07-14 21:48:12 UTC. --
Jul 14 21:48:12 www.rise.global systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Jul 14 21:48:12 www.rise.global httpd[20042]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Jul 14 21:48:12 www.rise.global httpd[20042]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Jul 14 21:48:12 www.rise.global httpd[20042]: no listening sockets available, shutting down
Jul 14 21:48:12 www.rise.global httpd[20042]: AH00015: Unable to open logs
Jul 14 21:48:12 www.rise.global systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 14 21:48:12 www.rise.global kill[20043]: kill: cannot find process ""
Jul 14 21:48:12 www.rise.global systemd[1]: httpd.service: control process exited, code=exited status=1
Jul 14 21:48:12 www.rise.global systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Jul 14 21:48:12 www.rise.global systemd[1]: Unit httpd.service entered failed state.
我检查服务器没有其他服务正在使用
使用80端口[root@www ~]# netstat -tulpn | grep 80
tcp 0 0 0.0.0.0:48001 0.0.0.0:* LISTEN 2573/nimbus(spooler
tcp 0 0 0.0.0.0:48000 0.0.0.0:* LISTEN 1412/nimbus(control
tcp6 0 0 :::80 :::* LISTEN 9327/httpd
udp 0 0 0.0.0.0:48000 0.0.0.0:* 1412/nimbus(control
udp6 0 0 fe80::225:90ff:fefa:123 :::* 2747/ntpd
udp6 0 0 fe80::225:90ff:fefa:123 :::* 2747/ntpd
我知道killall -9 httpd和重启服务器的解决方案。但我没有备份服务器,我很困惑。请告诉我这种情况下的替代安全步骤是什么。
我担心停机时间。
答案 0 :(得分:0)
当我给killall5 -9 httpd时,我与ssh断开连接,我需要从网络面板重启服务器。重新启动后,我发现一切都很好。