httpd.service的作业失败,因为控制进程退出并显示错误代码.参见"systemctl status httpd.service".和"journalctl -xe";详情

httpd.service的作业失败,因为控制进程退出并显示错误代码.参见

问题描述:

我已经安装了Centos 7的新副本.然后我重新启动了Apache,但是Apache无法启动.我在此问题上停留了3天.甚至支持人员也无法找出错误.

I have installed a fresh copy of Centos 7. Then I restarted Apache but the Apache failed to start. I have 3 days stucked in this issue. Even the support can not figure out the error.

sudo service httpd start


Failed to start apache :
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.


httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2016-05-09 16:08:02 BST; 59s ago
     Docs: man:httpd(8)
           man:apachectl(8)
 Main PID: 5710 (code=exited, status=1/FAILURE)

May 09 16:08:02 mike079.startdedicated.de systemd[1]: Starting The Apache HTTP Server...
May 09 16:08:02 mike079.startdedicated.de httpd[5710]: (98)Address already in use: AH00072: make_sock: could not bind to address 85.25.12.20:80
May 09 16:08:02 startdedicated.de httpd[5710]: no listening sockets available, shutting down
May 09 16:08:02 startdedicated.de httpd[5710]: AH00015: Unable to open logs
May 09 16:08:02 startdedicated.de systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
May 09 16:08:02.startdedicated.de kill[5712]: kill: cannot find process ""
May 09 16:08:02 .startdedicated.de systemd[1]: httpd.service: control process exited, code=exited status=1
May 09 16:08:02startdedicated.de systemd[1]: Failed to start The Apache HTTP Server.
May 09 16:08:02 startdedicated.de systemd[1]: Unit httpd.service entered failed state.
May 09 16:08:02 mike: httpd.service failed.

来自您的输出:

没有可用的监听套接字,正在关闭

no listening sockets available, shutting down

从根本上讲,一个Apache将要监听的端口已被另一应用程序使用.

what basically means, that any port in which one apache is going to be listening is already being used by another application.

netstat -punta | grep LISTEN

将为您提供所有正在使用的端口的列表以及识别哪个进程所需的信息,以便您可以kill stop或使用它进行任何操作.

Will give you a list of all the ports being used and the information needed to recognize which process is so you can kill stop or do whatever you want to do with it.

对您的IP做nmap后,我可以看到

After doing a nmap of your ip I can see that

80/tcp    open     http

所以我想你已经解决了.

so I guess you sorted it out.