Score:1

Apache2 Error Job for apache2.service failed because the control process exited with error code

ps flag

I am trying to run an apache2 web server with linode and ubuntu. I got the following error

    Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xeu apache2.service" for details.

After running

sudo service apache2 start

I ran the commands they offered and got:

systemctl status apache2.service

× apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Fri 2023-04-28 12:59:56 UTC; 2min 13s ago
   Duration: 27min 6.692s
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 6388 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
        CPU: 11ms

and

journalctl -xeu apache2.service
Hint: You are currently not seeing messages from other users and the system.
      Users in groups 'adm', 'systemd-journal' can see all messages.
      Pass -q to turn off this notice.
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
-- No entries --

Does anyone know how to solve this? If you need any other information ask I just didn't want to overflow the question

David avatar
cn flag
What is the version of Ubuntu?
Score:0
it flag

First, read your error messages. Does id show that you're in one of the groups adm, or systemd-journal? Contact your system administrator or sudo adduser $USER systemd-journal, followed by logout/login, as groups are set up by login.

Alternatively you could use sudo;

sudo journalctl -xeu apache2.service

Second, your apache2 has been up for Duration: 27min 6.692s. Did you forget to stop the old apache2?

Third, is any other process listening on TCP Port 80? sudo lsof itcp:80. Clean that up. Port listening can't be shared.

Read man journalctl lsof sudo service.

sean python avatar
ps flag
How do I get to the error massage
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.