3
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor pres
   Active: **failed** (Result: exit-code) since Sun 2018-07-08 22:32:36 SAST; 18
  Process: 18097 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/

Jul 08 22:32:36 anonymous apachectl[18097]: AH00558: apache2: Could not reli
Jul 08 22:32:36 anonymous apachectl[18097]: (98)Address already in use: AH00
Jul 08 22:32:36 anonymous apachectl[18097]: (98)Address already in use: AH00
Jul 08 22:32:36 anonymous apachectl[18097]: no listening sockets available, 
Jul 08 22:32:36 anonymous apachectl[18097]: AH00015: Unable to open logs
Jul 08 22:32:36 anonymous apachectl[18097]: Action 'start' failed.
Jul 08 22:32:36 anonymous apachectl[18097]: The Apache error log may have mo
Jul 08 22:32:36 anonymous systemd[1]: apache2.service: Control process exite
Jul 08 22:32:36 anonymous systemd[1]: apache2.service: Failed with result 'e
Jul 08 22:32:36 anonymous systemd[1]: **Failed to start The Apache HTTP Server**
lines 1-15/15 (END)
  • Hi Thors and welcome to askUbuntu! Add the output (at least the last lines) of your /var/log/apache2/error.log to your post. Resize your window or pipe the output withtee to a file, so that you can post the whole linen when restarting apache2! – abu_bua Jul 8 '18 at 20:58
  • 1
    You don't happen to have another web server already listening on ports 80 and 443, do you? – AlexP Jul 8 '18 at 21:38
  • Please check first : /var/log/apache2/error.log – Dhaduk Mitesh Jul 9 '18 at 6:37
  • And how many web server installed in your system? – Dhaduk Mitesh Jul 9 '18 at 6:38
  • Hello, and thank you for your response [Mon Jul 09 19:20:48.240466 2018] [mpm_event:notice] [pid 1330:tid 140604777876416] AH00489: Apache/2.4.33 (Ubuntu) OpenSSL/1.1.0g configured -- resuming normal operations [Mon Jul 09 19:20:48.240633 2018] [core:notice] [pid 1330:tid 140604777876416] AH00094: Command line: '/usr/sbin/apache2' – Thors Hammer Jul 9 '18 at 18:14
1

The reason Apache fails to start is because something is already listening on the port/ip combination. The log entries of "Address already in use" indicate this.

You need to identify what other service is running on those ports and then go and shut it off before turning on Apache.

However, since your log snippets ONLY are partial (and not from sudo systemctl -l status apache2 so we can see all the actual useful information in large form, or from /var/log/apache2/error.log directly), we can't really point you at which application(s) to look at since we can't determine the ports in use (my assumption is Port 80, in which case sudo ss -ntlp 'sport = 80' will get us a better idea of what is already listening on Port 80. Please replace '80' with whatever other port is actually in use according to the long log data, which is cut off in what you pasted here.)

Not the answer you're looking for? Browse other questions tagged or ask your own question.