0

Hello serverfault community. I'm setting up a nextcloud server, but apache is not starting. When I run systemctl status apache2 I get:

● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2021-02-03 12:13:29 CET; 2min 19s ago Docs: https://httpd.apache.org/docs/2.4/ Process: 16936 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

feb 03 12:13:29 alumno-VirtualBox systemd[1]: Starting The Apache HTTP Server... feb 03 12:13:29 alumno-VirtualBox apachectl[16949]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 feb 03 12:13:29 alumno-VirtualBox apachectl[16949]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 feb 03 12:13:29 alumno-VirtualBox apachectl[16949]: no listening sockets available, shutting down feb 03 12:13:29 alumno-VirtualBox apachectl[16949]: AH00015: Unable to open logs feb 03 12:13:29 alumno-VirtualBox apachectl[16936]: Action 'start' failed. feb 03 12:13:29 alumno-VirtualBox apachectl[16936]: The Apache error log may have more information. feb 03 12:13:29 alumno-VirtualBox systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE feb 03 12:13:29 alumno-VirtualBox systemd[1]: apache2.service: Failed with result 'exit-code'. feb 03 12:13:29 alumno-VirtualBox systemd[1]: Failed to start The Apache HTTP Server.

I believe these would be the errors:

(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80

(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80

When I run sudo netstat -ltnp | grep :80 I get:

tcp6 0 0 :::80 :::* LISTEN 3213/httpd

As seen here httpd is running on tcp6, and I think this could be a potential problem. Any ideas?

Thanks in advance and let me know if you need additional information.

Edit: The problem is solved but I did nothing to solve it. Sorry if this doesn't help but I really don't know how any of this happened

  • Where did "httpd" come from? How did it get onto your system? – Michael Hampton Feb 03 '21 at 14:43
  • I don't know but I wanted to know as well. Is there any way I could check? – Nico Nico Pizza Feb 05 '21 at 09:20
  • I would find whoever installed the system and ask them what they did, if they are still employed by your company. Otherwise you could poke around the system yourself to see if you can figure out how it was installed. Try checking the package manager's history and possibly the root user's shell history. – Michael Hampton Feb 05 '21 at 13:04
  • When you had this issue, was it intermittent or consistent? – Elijah Lynn Jul 19 '21 at 22:46

1 Answers1

0

I think httpd.service is for CentOS what apache2.service is for Debian based. Basically it's the same under different names. I advise you to check if httpd.service is really present with

 systemctl status httpd.service

If the result is positive, you can deactivate it