Failed to start The Apache HTTP Server

Version:1.0 StartHTML:0000000167 EndHTML:0000002349 StartFragment:0000000454 EndFragment:0000002333

DEBIAN 9

Au demarrage j’ai ce message

Failed to start The Apache HTTP Server

See systemctl status apache2.service

apache2.service - The Apache HTTP Server

Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset:

Active: failed (Result: exit-code) since Sat 2019-06-08 20:23:16 CEST; 4min 5

Process: 541 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILUR

juin 08 20:23:14 debian systemd[1]: Starting The Apache HTTP Server...

juin 08 20:23:16 debian apachectl[541]: AH00534: apache2: Configuration error: N

juin 08 20:23:16 debian apachectl[541]: Action 'start' failed.

juin 08 20:23:16 debian apachectl[541]: The Apache error log may have more infor

juin 08 20:23:16 debian systemd[1]: apache2.service: Control process exited, cod

juin 08 20:23:16 debian systemd[1]: Failed to start The Apache HTTP Server.

juin 08 20:23:16 debian systemd[1]: apache2.service: Unit entered failed state.

juin 08 20:23:16 debian systemd[1]:

la reinstallation de apache2 dans gestionnaire de paquet ne donne rien

Merci pour votre aide

Il faut chercher dans les logs :

journalctl -u apache2.service

As-tu à minima vérifier la configuration de ton indien ? apache2ctl configtest

1 J'aime

Dans apache2ctl et apachectl
Dans start
aucune anomalie

Version:1.0 StartHTML:0000000167 EndHTML:0000002438 StartFragment:0000000454 EndFragment:0000002422

case $ARGV in

start)

ssl_scache shouldn’t be here if we’re just starting up.

(this is bad if there are several apache2 instances running)

rm -f ${APACHE_RUN_DIR:-/var/run/apache2}/ssl_scache

need_systemd=false

if [ -z "$APACHE_STARTED_BY_SYSTEMD" ] ; then

case "$(readlink -f /proc/1/exe)" in

systemd)

need_systemd=true

;;

*)

;;

esac

fi

if $need_systemd ; then

If running on systemd we should not start httpd without systemd

or systemd will get confused about the status of httpd.

echo “Invoking ‘systemctl start $APACHE_SYSTEMD_SERVICE’.”

echo “Use ‘systemctl status $APACHE_SYSTEMD_SERVICE’ for more info.”

systemctl start "$APACHE_SYSTEMD_SERVICE"

else

unset APACHE_STARTED_BY_SYSTEMD

$HTTPD ${APACHE_ARGUMENTS} -k $ARGV

fi

ERROR=$?

;;

Bonjour,

Les lignes que tu fournies sont coupées pile poil sur ce qui pourrait nous intéresser:

juin 08 20:23:16 debian apachectl[541]: AH00534: apache2: Configuration error: N

Version:1.0 StartHTML:0000000167 EndHTML:0000002363 StartFragment:0000000454 EndFragment:0000002347

DEBIAN 9

Au demarrage j’ai ce message

Failed to start The Apache HTTP Server

See 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 Thu 2019-06-13 09:57:40 CEST; 4min 34s ago

Process: 536 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

juin 13 09:57:35 debian systemd[1]: Starting The Apache HTTP Server…

juin 13 09:57:40 debian apachectl[536]: AH00534: apache2: Configuration error: No MPM loaded

juin 13 09:57:40 debian apachectl[536]: Action ‘start’ failed.

juin 13 09:57:40 debian apachectl[536]: The Apache error log may have more information.

juin 13 09:57:40 debian systemd[1]: apache2.service: Control process exited, code=exited sta

juin 13 09:57:40 debian systemd[1]: Failed to start The Apache HTTP Server.

juin 13 09:57:40 debian systemd[1]: apache2.service: Unit entered failed state.

juin 13 09:57:40 debian systemd[1]: apache2.service: Failed with result ‘exit-code’.

~

~

No MPM loaded ?

Il y a plusieurs module MPM, je crois sans etre certain que celui de base est le prefork. Donc :

  1. sudo apt-get install apache2-bin
  2. sudo a2enmod mpm_prefork
  3. sudo systemctl start apache2.service
  4. tail -n 50 /var/log/apache2/error.log

apache2-bin is already the newest version (2.4.25-3+deb9u7).
apache2-bin passé en « installé manuellement ».
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
root@debian:/home/tacvor# a2enmod mpm_prefork
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
root@debian:/home/tacvor# systemctl start apache2.service
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
root@debian:/home/tacvor# tail -n 50/var/log/apache2/error.log
tail: nombre de lignes incorrect: « 50/var/log/apache2/error.log »
root@debian:/home/tacvor# tail -n 5/var/log/apache2/error.log
tail: nombre de lignes incorrect: « 5/var/log/apache2/error.log »

Merci pour votre aide

Etrange, cela voudrait dire que tes modules sont bien activés.

Essais :
1- a2dismomd mpm_worker et aussi avec la meme commande mpm_event

En fait suffit de lire les reponse et jouer avec a2enmod et a2dismod afin de trouver le mpm qui va bien.

a2dismomd commande introuvable

a2dismod

MPM_WORKER est desactivé comme mpm_event

root@debian:/home/tacvor# a2dismod mpm_worker```
Module mpm_worker already disabled```
root@debian:/home/tacvor# a2dismod mpm_event
Module mpm_event already disabled``
root@debian:/home/tacvor# a2enmod mpm_worker```
Considering conflict mpm_event for mpm_worker:```
Considering conflict mpm_prefork for mpm_worker:``
ERROR: Module mpm_prefork is enabled - cannot proceed due to conflicts. It needs to be disabled first!`
root@debian:/home/tacvor# a2enmod mpm_event``
Considering conflict mpm_worker for mpm_event:`
Considering conflict mpm_prefork for mpm_event:``
ERROR: Module mpm_prefork is enabled - cannot proceed due to conflicts. It needs to be disabled first!

Tout est expliqué il me semble dans le message d’erreur :wink:

Que l’on active mpm_worker ou mpm_event ou mpm_prefork
j’ai toujours le même messagee

Bonjour,

Tu dois apparemment désactiver le module mpm_prefork avant d’activer le module mpm_event.

La lecture me semble simple.

Merci c’est ce que j’ai fait

Merci pour votre aide
j’ai résolu le problème en supprimant complétement apache2
et les dépendances
apt-get remove apache2 et install apche2 ne suffisait pas
il fallait utilisait – purge autoremove apache2 et install apache2
le message d’erreur a disparuu

Impecc’ ! Premiere installe foireuse, ca arrive rarement, mais ca arrive pour preuve :slight_smile: