Httpd.service not running

I have apache installed on RHEL 7.2 and here is what I see upon starting apache as a root user:

[root@exampledomain conf]# sudo apachectl start
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@exampledomain conf]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2017-03-06 10:13:04 CST; 13s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 6068 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 6061 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 6061 (code=exited, status=1/FAILURE)

Mar 06 10:13:04 exampledomain.com systemd[1]: Starting The Apache HTTP Server...
Mar 06 10:13:04 exampledomain.com httpd[6061]: (99)Cannot assign requested address: AH00072: make_sock: could not bind to address XX.XX.XXX.XX:80
Mar 06 10:13:04 exampledomain.com httpd[6061]: no listening sockets available, shutting down
Mar 06 10:13:04 exampledomain.com httpd[6061]: AH00015: Unable to open logs
Mar 06 10:13:04 exampledomain.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 06 10:13:04 exampledomain.com kill[6068]: kill: cannot find process ""
Mar 06 10:13:04 exampledomain.com systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 06 10:13:04 exampledomain.com systemd[1]: Failed to start The Apache HTTP Server.
Mar 06 10:13:04 exampledomain.com systemd[1]: Unit httpd.service entered failed state.
Mar 06 10:13:04 exampledomain.com systemd[1]: httpd.service failed.
[root@exampledomain conf]#

After running the other command as a root user journalctl -xe, I saw the following:

[root@exampledomain conf]# journalctl -xe
Mar 06 10:10:07 exampledomain.com systemd[1]: Stopping user-0.slice.
-- Subject: Unit user-0.slice has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has begun shutting down.
Mar 06 10:13:00 exampledomain.com polkitd[15042]: Registered Authentication Agent for unix-process:5884:119511260 (system bus name :1.10361 [/usr/bin
Mar 06 10:13:00 exampledomain.com systemd[1]: Cannot add dependency job for unit microcode.service, ignoring: Unit is not loaded properly: Invalid ar
Mar 06 10:13:00 exampledomain.com 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.
Mar 06 10:13:00 exampledomain.com httpd[5890]: (99)Cannot assign requested address: AH00072: make_sock: could not bind to address XX.XX.XXX.XX:80
Mar 06 10:13:00 exampledomain.com httpd[5890]: no listening sockets available, shutting down
Mar 06 10:13:00 exampledomain.com httpd[5890]: AH00015: Unable to open logs
Mar 06 10:13:00 exampledomain.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 06 10:13:00 exampledomain.com kill[5898]: kill: cannot find process ""
Mar 06 10:13:00 exampledomain.com systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 06 10:13:00 exampledomain.com 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.
Mar 06 10:13:00 exampledomain.com systemd[1]: Unit httpd.service entered failed state.
Mar 06 10:13:00 exampledomain.com systemd[1]: httpd.service failed.
Mar 06 10:13:00 exampledomain.com polkitd[15042]: Unregistered Authentication Agent for unix-process:5884:119511260 (system bus name :1.10361, object
Mar 06 10:13:04 exampledomain.com sudo[6052]:   akhare : TTY=pts/1 ; PWD=/etc/httpd/conf ; USER=root ; COMMAND=/sbin/apachectl start
Mar 06 10:13:04 exampledomain.com polkitd[15042]: Registered Authentication Agent for unix-process:6055:119511697 (system bus name :1.10362 [/usr/bin
Mar 06 10:13:04 exampledomain.com systemd[1]: Cannot add dependency job for unit microcode.service, ignoring: Unit is not loaded properly: Invalid ar
Mar 06 10:13:04 exampledomain.com 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.
Mar 06 10:13:04 exampledomain.com httpd[6061]: (99)Cannot assign requested address: AH00072: make_sock: could not bind to address XX.XX.XXX.XX:80
Mar 06 10:13:04 exampledomain.com httpd[6061]: no listening sockets available, shutting down
Mar 06 10:13:04 exampledomain.com httpd[6061]: AH00015: Unable to open logs
Mar 06 10:13:04 exampledomain.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 06 10:13:04 exampledomain.com kill[6068]: kill: cannot find process ""
Mar 06 10:13:04 exampledomain.com systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 06 10:13:04 exampledomain.com 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.
Mar 06 10:13:04 exampledomain.com systemd[1]: Unit httpd.service entered failed state.
Mar 06 10:13:04 exampledomain.com systemd[1]: httpd.service failed.
Mar 06 10:13:05 exampledomain.com polkitd[15042]: Unregistered Authentication Agent for unix-process:6055:119511697 (system bus name :1.10362, object

I saw this post with the same error and tried to see the list of ports using the command mentioned over there netstat -punta | grep LISTEN but couldn’t figure out what’s the problem.

The result of netstat -punta command is as follows:

[root@termsprweb1 conf]# netstat -punta
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      1350/smbd
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/systemd
tcp        0      0 AAA.AAA.AAA.A:53        0.0.0.0:*               LISTEN      2641/dnsmasq
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1718/sshd
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1563/cupsd
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      1350/smbd
tcp        0      0 XX.XX.XXX.XX:22         YY.YY.YY.YYY:55863      ESTABLISHED 13706/sshd: myusername
tcp        0     36 XX.XX.XXX.XX:22         YY.YY.YY.YYY:55025      ESTABLISHED 7497/sshd: myusername [
tcp        0      0 XX.XX.XXX.XX:22         YY.YY.YY.YYY:62755      ESTABLISHED 11633/sshd: myusername
tcp        0      0 XX.XX.XXX.XX:22         CC.CC.CC.CCC:54496      ESTABLISHED 9475/sshd: otherusername
tcp        0      0 XX.XX.XXX.XX:22         YY.YY.YY.YYY:55027      ESTABLISHED 7499/sshd: myusername [
tcp        0      0 XX.XX.XXX.XX:22         YY.YY.YY.YYY:62723      ESTABLISHED 11423/sshd: myusername
tcp6       0      0 :::3306                 :::*                    LISTEN      1799/mysqld
tcp6       0      0 :::139                  :::*                    LISTEN      1350/smbd
tcp6       0      0 :::111                  :::*                    LISTEN      1916/rpcbind
tcp6       0      0 :::22                   :::*                    LISTEN      1718/sshd
tcp6       0      0 :::445                  :::*                    LISTEN      1350/smbd
udp        0      0 AAA.AAA.AAA.A:53        0.0.0.0:*                           14932/dnsmasq
udp        0      0 AAA.AAA.AAA.A:53        0.0.0.0:*                           2641/dnsmasq
udp        0      0 0.0.0.0:67              0.0.0.0:*                           14932/dnsmasq
udp        0      0 0.0.0.0:67              0.0.0.0:*                           2641/dnsmasq
udp        0      0 0.0.0.0:111             0.0.0.0:*                           1916/rpcbind
udp        0      0 XX.XX.XXX.XX:123        0.0.0.0:*                           2968/ntpd
udp        0      0 AAA.AAA.AAA.A:123       0.0.0.0:*                           2968/ntpd
udp        0      0 127.0.0.1:123           0.0.0.0:*                           2968/ntpd
udp        0      0 0.0.0.0:123             0.0.0.0:*                           2968/ntpd
udp        0      0 0.0.0.0:43237           0.0.0.0:*                           1672/avahi-daemon:
udp        0      0 0.0.0.0:819             0.0.0.0:*                           1916/rpcbind
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1672/avahi-daemon:
udp6       0      0 :::111                  :::*                                1916/rpcbind
udp6       0      0 :::123                  :::*                                2968/ntpd
udp6       0      0 :::819                  :::*                                1916/rpcbind


where  YY.YY.YY.YYY  is my system IP address.

       XX.XX.XXX.XX  is the server on which Apache is installed

Does Apache start if you register for it another port (like 8080 or 888)?

Thanks Tete. I had wrong IP address configured which was creating the problem.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.