My Apache2 file/print/web server is running Bullseye. I had to
restart it yesterday evening to replace a disk drive. Otherwise
the last reboot was a couple of weeks ago - I recall some updates
to Jitsi - but I don't think there were any updates since then.
Today I find that I can't get through to any of the sites on the
server. Instead I get the Apache2 default web page. This happens
with both Firefox and Chromium. This happens for all the staging
sites (that I access as ".loc" through entries in my hosts file).
My jitsi and nextcloud servers simply report failure to get to the
server.
I verified that the site files (-available and -enabled) haven't changed in months.
I tried restarting the apache2 service and got an error so I tried stopping it then starting it again - same error:
root@TheLibrarian:~#
service apache2 start
Job for apache2.service failed because the control process
exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for
details.
root@TheLibrarian:~# 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 Wed 2022-05-04 12:16:55 EDT; 5s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 7932 ExecStart=/usr/sbin/apachectl start (code=exited,
status=1/FAILURE)
CPU: 29ms
May 04 12:16:55 TheLibrarian systemd[1]: Starting The Apache
HTTP Server...
May 04 12:16:55 TheLibrarian apachectl[7935]: (98)Address
already in use: AH00072: make_sock: could not bind to addre>
May 04 12:16:55 TheLibrarian apachectl[7935]: (98)Address
already in use: AH00072: make_sock: could not bind to addre>
May 04 12:16:55 TheLibrarian apachectl[7935]: no listening
sockets available, shutting down
May 04 12:16:55 TheLibrarian apachectl[7935]: AH00015: Unable to
open logs
May 04 12:16:55 TheLibrarian apachectl[7932]: Action 'start'
failed.
May 04 12:16:55 TheLibrarian apachectl[7932]: The Apache error
log may have more information.
May 04 12:16:55 TheLibrarian systemd[1]: apache2.service:
Control process exited, code=exited, status=1/FAILURE
May 04 12:16:55 TheLibrarian systemd[1]: apache2.service:
Failed with result 'exit-code'.
May 04 12:16:55 TheLibrarian systemd[1]: Failed
to start The Apache HTTP Server.
also
root@TheLibrarian:/var/log#
journalctl -xe
░░ The job
identifier is 4527.
May 04 12:50:49 TheLibrarian apachectl[8232]: (98)Address
already in use: AH00072: make_sock: could not bind to addre>
May 04 12:50:49 TheLibrarian apachectl[8232]: (98)Address
already in use: AH00072: make_sock: could not bind to addre>
May 04 12:50:49 TheLibrarian apachectl[8232]: no listening
sockets available, shutting down
May 04 12:50:49 TheLibrarian apachectl[8232]: AH00015: Unable to
open logs
May 04 12:50:49 TheLibrarian apachectl[8229]: Action 'start'
failed.
May 04 12:50:49 TheLibrarian apachectl[8229]: The Apache error
log may have more information.
May 04 12:50:49 TheLibrarian systemd[1]: apache2.service:
Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit
process exited
░░ Defined-By:
systemd
░░ Support:
https://www.debian.org/support
░░
░░ An ExecStart=
process belonging to unit apache2.service has exited.
░░
░░ The process'
exit code is 'exited' and its exit status is 1.
May 04 12:50:49 TheLibrarian systemd[1]: apache2.service:
Failed with result 'exit-code'.
░░ Subject: Unit
failed
░░ Defined-By:
systemd
░░ Support:
https://www.debian.org/support
░░
░░ The unit
apache2.service has entered the 'failed' state with result
'exit-code'.
May 04 12:50:49 TheLibrarian systemd[1]: Failed
to start The Apache HTTP Server.
░░ Subject: A
start job for unit apache2.service has failed
░░ Defined-By:
systemd
░░ Support:
https://www.debian.org/support
░░
░░ A start job
for unit apache2.service has finished with a failure.
░░
░░ The job
identifier is 4527 and the job result is failed.
As I said, I do get the default Apache2 page saying "It works"
but that appears to be optimistic. ps aux | grep apache2 fails to
show the service, which confirms the systemctl message that it
isn't running.
There is nothing in /var/log/apache2/error.log. The .1 log ends
yesterday but only contains complaints about php7. Systemctl does
report (above) "unable to open logs" so that would explain the
lack of additional messages. The apache2 directory and its files
are root:adm with only root having write privileges.
I tried giving the adm group write privileges but that didn't
work. Turns out the group is empty. Adding www-data to it didn't
work either.
Any ideas on how to track down the cause of the failure(s)?
Thanks.