Score:0

Can't start apache2. "Job for apache2.service failed because the control process exited with error code."

tw flag

I also get this: See "systemctl status apache2.service" and "journalctl -xeu apache2.service" for details.

After running it I got this:

ene 27 16:26:55 homecloud apachectl[26565]: The Apache error log may have more information.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ An ExecStart= process belonging to unit apache2.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Killing process 26540 (apache2) with signal SIGKILL.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Killing process 26541 (apache2) with signal SIGKILL.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Killing process 26540 (apache2) with signal SIGKILL.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Killing process 26541 (apache2) with signal SIGKILL.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit apache2.service has entered the 'failed' state with result 'exit-code'.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Unit process 26540 (apache2) remains running after unit stopped.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Unit process 26541 (apache2) remains running after unit stopped.
ene 27 16:26:55 homecloud systemd[1]: Failed to start The Apache HTTP Server.
░░ Subject: A start job for unit apache2.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit apache2.service has finished with a failure.
░░
░░ The job identifier is 4128 and the job result is failed.
lines 2390-2418/2418 (END)
ene 27 16:26:55 homecloud apachectl[26565]: The Apache error log may have more information.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ An ExecStart= process belonging to unit apache2.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Killing process 26540 (apache2) with signal SIGKILL.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Killing process 26541 (apache2) with signal SIGKILL.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Killing process 26540 (apache2) with signal SIGKILL.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Killing process 26541 (apache2) with signal SIGKILL.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit apache2.service has entered the 'failed' state with result 'exit-code'.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Unit process 26540 (apache2) remains running after unit stopped.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Unit process 26541 (apache2) remains running after unit stopped.
ene 27 16:26:55 homecloud systemd[1]: Failed to start The Apache HTTP Server.
░░ Subject: A start job for unit apache2.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit apache2.service has finished with a failure.
░░
░░ The job identifier is 4128 and the job result is failed.

And this for systemctl status apache2.service:

× apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2023-01-27 16:26:55 UTC; 2min 6s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 26565 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
      Tasks: 2 (limit: 9198)
     Memory: 57.6M
        CPU: 22ms
     CGroup: /system.slice/apache2.service
             ├─26540 /usr/sbin/apache2 -k start
             └─26541 /usr/sbin/apache2 -k start

ene 27 16:26:55 homecloud apachectl[26565]: The Apache error log may have more information.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Killing process 26540 (apache2) with signal SIGKILL.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Killing process 26541 (apache2) with signal SIGKILL.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Killing process 26540 (apache2) with signal SIGKILL.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Killing process 26541 (apache2) with signal SIGKILL.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Failed with result 'exit-code'.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Unit process 26540 (apache2) remains running after unit stopped.
ene 27 16:26:55 homecloud systemd[1]: apache2.service: Unit process 26541 (apache2) remains running after unit stopped.

I already reinstalled apache, but this keeps happening

EDIT: Add log segment from /var/log/apache2/error.log:

[Fri Jan 27 16:26:00.609954 2023] [mpm_prefork:notice] [pid 26097] AH00171: Graceful restart requested, doing restart AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Fri Jan 27 16:26:00.653672 2023] [mpm_prefork:notice] [pid 26097] AH00163: Apache/2.4.52 (Ubuntu) OpenSSL/3.0.2 configured -- resuming normal operations
[Fri Jan 27 16:26:00.653689 2023] [core:notice] [pid 26097] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jan 27 16:26:55.393099 2023] [mpm_prefork:notice] [pid 26097] AH00170: caught SIGWINCH, shutting down gracefully –
Doug Smythies avatar
gn flag
Is there an Apache error log at `/var/log/apache2/error.log` and does it provide any insight?
Pablo Rodríguez avatar
tw flag
@DougSmythies There is a log, but don't really see anything that looks relevant [Fri Jan 27 16:26:00.609954 2023] [mpm_prefork:notice] [pid 26097] AH00171: Graceful restart requested, doing restart AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message [Fri Jan 27 16:26:00.653672 2023] [mpm_prefork:notice] [pid 26097] AH00163: Apache/2.4.52 (Ubuntu) OpenSSL/3.0.2 configured -- resuming normal operations (continues next comment)
Pablo Rodríguez avatar
tw flag
[Fri Jan 27 16:26:00.653689 2023] [core:notice] [pid 26097] AH00094: Command line: '/usr/sbin/apache2' [Fri Jan 27 16:26:55.393099 2023] [mpm_prefork:notice] [pid 26097] AH00170: caught SIGWINCH, shutting down gracefully
Doug Smythies avatar
gn flag
It is not obvious to me why `SIGWINCH` (resizing of a window) would result in a graceful shutdown.
Pablo Rodríguez avatar
tw flag
@DougSmythies I'm trying to restart apache2, I run systemctl restart apache2, or stop and then start, but it doesn't work (stopping doesn't even stop it), but maybe what's causing issues is that?
Doug Smythies avatar
gn flag
Try increasing the error log level in `/etc/apache2/apache2.conf`. By default it is `LogLevel warn`, so try `LogLevel debug`. Remember to revert afterwards, as `debug` logs a lot of stuff.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.