0

我曾尝试使用 puppet 配置 apache。当我尝试启动 apache 时,它​​没有任何正确的错误消息而失败。我不明白为什么它失败了。我尝试执行以下命令,它只是说启动失败,并且没有显示任何启动失败的具体原因。你能告诉我如何弄清楚发生了什么吗?我在下面附上我的日志文件。

systemctl status httpd.service
journalctl -xe


Aug 15 22:56:03 hostname systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Aug 15 22:56:03 hostname httpd[18999]: no listening sockets available, shutting down
Aug 15 22:56:03 hostname httpd[18999]: AH00015: Unable to open logs
Aug 15 22:56:03 hostname systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Aug 15 22:56:03 hostname kill[19001]: kill: cannot find process ""
Aug 15 22:56:03 hostname audispd[414]: node=hostname type=SERVICE_START msg=audit(1471316163.292:57410): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=
Aug 15 22:56:03 hostname systemd[1]: httpd.service: control process exited, code=exited status=1
Aug 15 22:56:03 hostname 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.
Aug 15 22:56:03 hostname systemd[1]: Unit httpd.service entered failed state.
Aug 15 22:56:03 hostname systemd[1]: httpd.service failed.
Aug 15 22:56:03 hostname polkitd[532]: Unregistered Authentication Agent for unix-process:18984:32063862 (system bus name :1.15792, object path /org/freedesktop/P
4

2 回答 2

2

我认为你最好的提示是

Aug 15 22:56:03 hostname httpd[18999]: no listening sockets available, shutting down

看起来另一个进程正在侦听tomcat试图侦听的套接字,默认情况下是8080,或者您可以检查conf以查看设置了什么

您可以使用类似的命令

 lsof -i TCP |grep 8080 

top获取在该端口上侦听的进程 id 并在其中或其他任何地方进行跟踪

于 2016-08-16T03:14:18.070 回答
0

我能够找出问题所在,puppet的默认配置已将httpd.conf中的监听端口注释掉并添加了一个port.conf。但由于我没有明确配置监听端口,apache 没有默认端口来监听。我已经配置了端口并开始工作。

于 2016-08-16T14:27:16.510 回答