Apache Service will not start

Issues related to configuring your network
Post Reply
TakeThat101
Posts: 7
Joined: 2018/09/04 23:17:32

Apache Service will not start

Post by TakeThat101 » 2018/09/04 23:22:13

Hello All! I have looked at the various other posts with the same expression of a problem, but different cause. Here is the output when I run

Code: Select all

systemctl start httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2018-09-04 19:12:19 EDT; 1min 46s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 1637 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 1635 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 1635 (code=exited, status=1/FAILURE)

Sep 04 19:12:19 localhost.localdomain httpd[1635]: (13)Permission denied: AH00072: make_s...21
Sep 04 19:12:19 localhost.localdomain httpd[1635]: (13)Permission denied: AH00072: make_s...21
Sep 04 19:12:19 localhost.localdomain httpd[1635]: no listening sockets available, shutti...wn
Sep 04 19:12:19 localhost.localdomain httpd[1635]: AH00015: Unable to open logs
Sep 04 19:12:19 localhost.localdomain systemd[1]: httpd.service: main process exited, cod...RE
Sep 04 19:12:19 localhost.localdomain kill[1637]: kill: cannot find process ""
Sep 04 19:12:19 localhost.localdomain systemd[1]: httpd.service: control process exited, ...=1
Sep 04 19:12:19 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
Sep 04 19:12:19 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
Sep 04 19:12:19 localhost.localdomain systemd[1]: httpd.service failed.

I did run

Code: Select all

sudo strace -e trace=file -o/tmp/strace.out /usr/sbin/httpd -DFOREGROUND -X
and have that output, but it is an extremely long list, obviously, so let me know if I need to post that.

User avatar
TrevorH
Forum Moderator
Posts: 23861
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Apache Service will not start

Post by TrevorH » 2018/09/04 23:27:02

Use systemctl status httpd -l so that the error lines aren't truncated.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

TakeThat101
Posts: 7
Joined: 2018/09/04 23:17:32

Re: Apache Service will not start

Post by TakeThat101 » 2018/09/05 00:15:47

Here it is:

● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2018-09-04 20:13:39 EDT; 1min 37s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 1146 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 1053 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 1053 (code=exited, status=1/FAILURE)

Sep 04 20:13:38 localhost.localdomain httpd[1053]: (13)Permission denied: AH00072: make_sock: could not bind to address [::]:4321
Sep 04 20:13:38 localhost.localdomain httpd[1053]: (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:4321
Sep 04 20:13:38 localhost.localdomain httpd[1053]: no listening sockets available, shutting down
Sep 04 20:13:38 localhost.localdomain httpd[1053]: AH00015: Unable to open logs
Sep 04 20:13:38 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Sep 04 20:13:39 localhost.localdomain kill[1146]: kill: cannot find process ""
Sep 04 20:13:39 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
Sep 04 20:13:39 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
Sep 04 20:13:39 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
Sep 04 20:13:39 localhost.localdomain systemd[1]: httpd.service failed.

TakeThat101
Posts: 7
Joined: 2018/09/04 23:17:32

Re: Apache Service will not start

Post by TakeThat101 » 2018/09/05 00:18:14

Also, this is a Virtual Machine, so I can try many different things with clones.

User avatar
TrevorH
Forum Moderator
Posts: 23861
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Apache Service will not start

Post by TrevorH » 2018/09/05 00:44:54

Sep 04 20:13:38 localhost.localdomain httpd[1053]: (13)Permission denied: AH00072: make_sock: could not bind to address [::]:4321
Sep 04 20:13:38 localhost.localdomain httpd[1053]: (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:4321
So that looks like you have tried to change the listen port from 80 to 4321 and to do that you will need to tell selinux that apache httpd is allowed to use the new port. Use man semanage-port to read about how to use the semanage command (part of the policycoreutils-python package) to do that.
Sep 04 20:13:38 localhost.localdomain httpd[1053]: AH00015: Unable to open logs
And that looks like you may have tried to change the log location too? I'd not do that, everything is set up to allow it to write logs to /var/log/httpd already so it's just easier to use that (or a subdirectory of it).
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

TakeThat101
Posts: 7
Joined: 2018/09/04 23:17:32

Re: Apache Service will not start

Post by TakeThat101 » 2018/09/05 01:42:20

I feel stupid now, some instructions on how to set up a server didn't include the step of allowing the firewall to let in traffic on certain ports so I added port 4321 thinking it would work. As for the log problem, I've not touched it, I don't know why it can't find it, but anyway, thanks for the help.

Post Reply