Score:0

My ubuntu 20.04 Apache2 has totally refused all solutions to start running again

kz flag

So about a week back, i think i was doing an apt upgrade and then got some prompts to autoremove some stuff which i did and my apache started acting up.

I have tried lots of solutions online but nothing is working.

sudo service apache2 start returns the error below.

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

Then

sudo service apache2 status

returns the errors below

● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2021-10-01 08:08:06 EAT; 2min 1s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 6759 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Oct 01 08:08:06 nm-linux apachectl[6762]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.33.23.240. Set the 'ServerName' directive globa>
Oct 01 08:08:06 nm-linux apachectl[6762]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Oct 01 08:08:06 nm-linux apachectl[6762]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Oct 01 08:08:06 nm-linux apachectl[6762]: no listening sockets available, shutting down
Oct 01 08:08:06 nm-linux apachectl[6762]: AH00015: Unable to open logs
Oct 01 08:08:06 nm-linux apachectl[6759]: Action 'start' failed.
Oct 01 08:08:06 nm-linux apachectl[6759]: The Apache error log may have more information.
Oct 01 08:08:06 nm-linux systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Oct 01 08:08:06 nm-linux systemd[1]: apache2.service: Failed with result 'exit-code'.
Oct 01 08:08:06 nm-linux systemd[1]: Failed to start The Apache HTTP Server.
lines 1-16/16 (END)

Currently my phpadmin doesnt work due to continous reinstallations to purge the apache installation. So localhost/phpmyadmin just doesnt load. My pgadmin is installed and it works very well.

I really need help on this as i have wasted a lot of time searching everywhere for a solution. Many thanks in advance.

Dr. Mukama avatar
kz flag
service mysql start is also raising the same error,
Dr. Mukama avatar
kz flag
systemctl start mysql does the same
in flag
There may be something in `/var/log/apache/error.log` that explains what the problem is. Could you [edit] your question with the most recent entries to that file?
Dr. Mukama avatar
kz flag
that file does not exist on my root. sudo gedit /var/log/apache/error.log returns an empty file
Wayne Vosberg avatar
bd flag
Is something already listening to port 80? Try `sudo lsof -i :80` or `sudo netstat -tulnp` to see.
Dr. Mukama avatar
kz flag
sudo lsof -i :80 returns COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME systemd 1 root 285u IPv4 31943 0t0 TCP *:http (LISTEN)
Wayne Vosberg avatar
bd flag
systemd / pid 1 is listening on port 80? Are you running some sort of firewall or proxy that would be intercepting port 80 before it gets to your server?
Dr. Mukama avatar
kz flag
sudo netstat -tulnp returns a a bunch of lines as shown in this screenshot https://github.com/HelloMukama/askubuntu/issues/1
Dr. Mukama avatar
kz flag
have tried lots of stuff but no luck.
Dr. Mukama avatar
kz flag
About your comment to do with firewall i have tried commands to disable firewall but still nothing. Would you share some commands i could try out again?
Wayne Vosberg avatar
bd flag
Your screen shot shows port 80 (ipv4) as owned by process init and an httpd server listening on port 8000 (ipv6). I suspect some sort of proxy/firewall but I've never seen this one before.
Dr. Mukama avatar
kz flag
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/130165/discussion-between-dr-mukama-and-wayne-vosberg).
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.