Ich habe eine neue, instabile Debian-Distribution mit Apache2 darauf. Apache selbst funktioniert einwandfrei. Wenn ich
sudo service apache2 start
es kommt auf und alles geht gut.
Der entsprechende Dienst kann jedoch bei jedem Start nicht gestartet werden.
Wie kann man hier dem Fehler auf die Spur kommen?
usw./log/apache2/error.log:
[Sun Jan 15 14:51:06.685936 2017] [mpm_prefork:notice] [pid 2208] AH00169: caught SIGTERM, shutting down
[Sun Jan 15 14:51:47.842447 2017] [mpm_prefork:notice] [pid 2200] AH00163: Apache/2.4.23 (Debian) configured -- resuming normal operations
[Sun Jan 15 14:51:48.145808 2017] [core:notice] [pid 2200] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jan 15 14:55:25.766188 2017] [mpm_prefork:notice] [pid 3257] AH00163: Apache/2.4.23 (Debian) configured -- resuming normal operations
[Sun Jan 15 14:55:25.801736 2017] [core:notice] [pid 3257] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jan 15 16:08:15.031691 2017] [mpm_prefork:notice] [pid 2316] AH00163: Apache/2.4.23 (Debian) configured -- resuming normal operations
[Sun Jan 15 16:08:15.043756 2017] [core:notice] [pid 2316] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 16 11:26:33.007967 2017] [mpm_prefork:notice] [pid 2278] AH00163: Apache/2.4.23 (Debian) configured -- resuming normal operations
[Mon Jan 16 11:26:33.013972 2017] [core:notice] [pid 2278] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jan 17 08:07:35.149382 2017] [mpm_prefork:notice] [pid 3517] AH00163: Apache/2.4.23 (Debian) configured -- resuming normal operations
[Tue Jan 17 08:07:35.152372 2017] [core:notice] [pid 3517] AH00094: Command line: '/usr/sbin/apache2'
Welche anderen Dateien wären zum Debuggen des Dienstfehlers hilfreich?
Antwort1
- Überprüfen Sie, ob der Dienst durch Ausführen aktiviert wurde
systemctl --no-page -t service -a | grep apache2
- Falls es deaktiviert ist, aktivieren Sie es und starten Sie:
systemctl enable apache2 && systemctl start apache2
- Überprüfen Sie, ob der Dienst funktioniert
systemctl status apache2
- Bei Bedarf können Sie die mit apache2.service verbundenen Protokolle wie folgt überprüfen:
journalctl --no-page -u apache2.service
Notiz.-f
Schlüssel funktioniert mitjournalctl
sowie mittail
Antwort2
Es liegt kein Fehler vor, das System funktioniert wie vorgesehen. Es klingt, als müssten Sie wahrscheinlich nuraktivierender Dienst, sodass er beim Booten gestartet wird.
systemctl enable service
Möglicherweise möchten Sie etwas Zeit mit der systemctl/systemd-Dokumentation verbringen.