[gelöst] apache2 startet nicht

Debian macht sich hervorragend als Web- und Mailserver. Schau auch in den " Tipps und Tricks"-Bereich.
Antworten
tapas
Beiträge: 12
Registriert: 10.01.2024 16:59:43

[gelöst] apache2 startet nicht

Beitrag von tapas » 17.04.2024 11:53:19

Nachdem ich heute die Sicherheitsupdates von bookworm eingespielt habe, tut der Apache nicht mehr:

Code: Alles auswählen

# 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 Wed 2024-04-17 11:38:04 CEST; 1min 16s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 1821 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
        CPU: 32ms

Apr 17 11:38:04 momo apachectl[1824]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Apr 17 11:38:04 momo apachectl[1824]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Apr 17 11:38:04 momo apachectl[1824]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Apr 17 11:38:04 momo apachectl[1824]: no listening sockets available, shutting down
Apr 17 11:38:04 momo apachectl[1824]: AH00015: Unable to open logs
Apr 17 11:38:04 momo apachectl[1821]: Action 'start' failed.
Apr 17 11:38:04 momo apachectl[1821]: The Apache error log may have more information.
Apr 17 11:38:04 momo systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Apr 17 11:38:04 momo systemd[1]: apache2.service: Failed with result 'exit-code'.
Apr 17 11:38:04 momo systemd[1]: Failed to start apache2.service - The Apache HTTP Server.

# journalctl -xeu apache2.service
Apr 17 11:38:04 momo systemd[1]: Starting apache2.service - The Apache HTTP Server...
░░ Subject: A start job for unit apache2.service has begun execution
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit apache2.service has begun execution.
░░ 
░░ The job identifier is 709.
Apr 17 11:38:04 momo apachectl[1824]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Apr 17 11:38:04 momo apachectl[1824]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Apr 17 11:38:04 momo apachectl[1824]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Apr 17 11:38:04 momo apachectl[1824]: no listening sockets available, shutting down
Apr 17 11:38:04 momo apachectl[1824]: AH00015: Unable to open logs
Apr 17 11:38:04 momo apachectl[1821]: Action 'start' failed.
Apr 17 11:38:04 momo apachectl[1821]: The Apache error log may have more information.
Apr 17 11:38:04 momo 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.
Apr 17 11:38:04 momo 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'.
Apr 17 11:38:04 momo systemd[1]: Failed to start apache2.service - 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 709 and the job result is failed.
Da der Apache auch keine Logs schreiben kann, hab' ich nun keine Idee mehr, wie ich weiter vorgehen kann. Kann mir da jemand weiterhelfen?

PS: Ich nutze den Apache lediglich, um via phpmyadmin auf die Datenbank zuzugreifen. PHP ist Version 8.2. Die einzige Änderung gegenüber der Standardinstallation sind ein paar größere Werte in /etc/php/8.2/apache2/php.ini
Zuletzt geändert von tapas am 17.04.2024 12:44:44, insgesamt 1-mal geändert.

mludwig
Beiträge: 797
Registriert: 30.01.2005 19:35:04

Re: apache2 startet nicht

Beitrag von mludwig » 17.04.2024 12:08:34

Code: Alles auswählen

Address already in use
ist eigentlich ziemlich eindeutig: Apache2 kann nicht an Port 80 lauschen, weil der schon belegt ist - entweder von einem anderen Programm, oder die vorherige apache-Instanz war nicht richtig beendet.

Mit

Code: Alles auswählen

ps aux
nachsehen, ob z. B. noch ein apache läuft, und diesen mit kill beenden. Danach lässt er sich bestimmt auch wieder starten ...

Benutzeravatar
heisenberg
Beiträge: 3583
Registriert: 04.06.2015 01:17:27
Lizenz eigener Beiträge: MIT Lizenz

Re: apache2 startet nicht

Beitrag von heisenberg » 17.04.2024 12:11:54

Im Zweifelsfall auch einfach nochmal als root schauen, mit einem ss -tulpen| grep -E ':80\W' welches Programm da den Port 80 belegt hat.
Jede Rohheit hat ihren Ursprung in einer Schwäche.

tapas
Beiträge: 12
Registriert: 10.01.2024 16:59:43

Re: apache2 startet nicht

Beitrag von tapas » 17.04.2024 12:22:21

heisenberg hat geschrieben: ↑ zum Beitrag ↑
17.04.2024 12:11:54
Im Zweifelsfall auch einfach nochmal als root schauen, mit einem ss -tulpen| grep -E ':80\W' welches Programm da den Port 80 belegt hat.
Ah, danke. Das hat geholfen:

Code: Alles auswählen

# ss -tulpen| grep -E ':80\W'
tcp   LISTEN 0      1024         0.0.0.0:80         0.0.0.0:*    users:(("lighttpd",pid=812,fd=5)) ino:17856 sk:9 cgroup:/system.slice/lighttpd.service <->                            
tcp   LISTEN 0      1024            [::]:80            [::]:*    users:(("lighttpd",pid=812,fd=4)) ino:17855 sk:c cgroup:/system.slice/lighttpd.service v6only:1 <->                   
Ich hatte letztens für ein BUILD ein paar Packete installiert, die man angeblich dafür braucht, da war der lighttpd mit drin, ohne dass mir das aufgefallen ist; der Fehler ist dann wohl erst beim Neustart heute morgen aufgetreten. Jetzt hab' ich den lighttpd wieder deinstalliert, da tut es wieder. ;-)

Danke für diese super schnelle Hilfe!

Antworten