J'utilise Ubuntu 16.04 et j'ai rencontré une erreur bizarre avec Apache2, où il ne démarre plus et je n'arrive pas à trouver la cause de ce problème. J'espère que quelqu'un avec des yeux neufs pourra m'aider ici.
Voici quelques erreurs que j'ai reçues :
>sudo 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.
Voici ensuite l'impression de ces deux commandes d'état :
$sudo systemctl status apache2.service
apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
apache2-systemd.conf
Active: failed (Result: exit-code) since Fri 2018-08-24 19:15:41 CEST; 2min 35s ago
Docs: man:systemd-sysv-generator(8)
Process: 8631 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
CGroup: /system.slice/apache2.service
8645 [pdflush-0
Aug 24 19:15:21 tegra-ubuntu systemd[1]: Starting LSB: Apache2 web server...
Aug 24 19:15:21 tegra-ubuntu apache2[8631]: * Starting Apache httpd web server apache2
Aug 24 19:15:41 tegra-ubuntu apache2[8631]: *
Aug 24 19:15:41 tegra-ubuntu apache2[8631]: * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
Aug 24 19:15:41 tegra-ubuntu systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 24 19:15:41 tegra-ubuntu systemd[1]: Failed to start LSB: Apache2 web server.
Aug 24 19:15:41 tegra-ubuntu systemd[1]: apache2.service: Unit entered failed state.
Aug 24 19:15:41 tegra-ubuntu systemd[1]: apache2.service: Failed with result 'exit-code'.
sudo journalctl -xe
Aug 24 19:20:03 tegra-ubuntu systemd[1]: Starting LSB: Apache2 web server...
-- Subject: Unit apache2.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has begun starting up.
Aug 24 19:20:03 tegra-ubuntu apache2[8768]: * Starting Apache httpd web server apache2
Aug 24 19:20:23 tegra-ubuntu apache2[8768]: *
Aug 24 19:20:23 tegra-ubuntu apache2[8768]: * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
Aug 24 19:20:23 tegra-ubuntu systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 24 19:20:23 tegra-ubuntu systemd[1]: Failed to start LSB: Apache2 web server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has failed.
--
-- The result is failed.
Aug 24 19:20:23 tegra-ubuntu systemd[1]: apache2.service: Unit entered failed state.
Aug 24 19:20:23 tegra-ubuntu systemd[1]: apache2.service: Failed with result 'exit-code'.
Aug 24 19:20:23 tegra-ubuntu sudo[8736]: pam_unix(sudo:session): session closed for user root
Et le test de configuration pour apache semble correct (si l'on ne tient pas compte de l'avertissement concernant le nom de serveur)
apachectl configtest
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
Syntax OK
Ce qui est encore plus intéressant, c'est que le fichier error.log d'apache2 est vide
Voici la sortie de journalctl (que j'ai un peu réduit car il répétait les mêmes choses pour Apache2 à cause de mes essais pour le faire fonctionner). Il semble que cela ne dise pas grand chose non plus, c'est bizarre.
-- Logs begin at Wed 2018-08-22 21:52:44 CEST, end at Sat 2018-08-25 13:25:11 CEST. --
Aug 24 19:20:03 tegra-ubuntu systemd[1]: Starting LSB: Apache2 web server...
Aug 24 19:20:03 tegra-ubuntu apache2[8768]: * Starting Apache httpd web server apache2
Aug 24 19:20:23 tegra-ubuntu apache2[8768]: *
Aug 24 19:20:23 tegra-ubuntu apache2[8768]: * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
Aug 24 19:20:23 tegra-ubuntu systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 24 19:20:23 tegra-ubuntu systemd[1]: Failed to start LSB: Apache2 web server.
Aug 24 19:20:23 tegra-ubuntu systemd[1]: apache2.service: Unit entered failed state.
Aug 24 19:20:23 tegra-ubuntu systemd[1]: apache2.service: Failed with result 'exit-code'.