2 votes

Apache ne démarre pas/ne redémarre pas

J'ai des problèmes avec Apache sur Ubuntu 15.10. Lorsque j'exécute sudo service apache2 restart

L'erreur suivante apparaît :

Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.

Donc je cours systemctl status apache2.service

apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2)
   Active: failed (Result: exit-code) since Sex 2016-01-08 09:05:40 BRST; 5min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 5840 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Jan 08 09:05:40 marcelonote systemd[1]: Starting LSB: Apache2 web server...
Jan 08 09:05:40 marcelonote apache2[5840]: * Starting web server apache2
Jan 08 09:05:40 marcelonote apache2[5840]: *
Jan 08 09:05:40 marcelonote apache2[5840]: * The apache2 configtest failed.
Jan 08 09:05:40 marcelonote apache2[5840]: Output of config test was:
Jan 08 09:05:40 marcelonote apache2[5840]: chown: invalid user: 'victor'
Jan 08 09:05:40 marcelonote systemd[1]: apache2.service: Control process exited, code=exited status=1
Jan 08 09:05:40 marcelonote systemd[1]: Failed to start LSB: Apache2 web server.
Jan 08 09:05:40 marcelonote systemd[1]: apache2.service: Unit entered failed state.
Jan 08 09:05:40 marcelonote systemd[1]: apache2.service: Failed with result 'exit-code'.

Y journalctl -xe

Jan 08 09:09:09 marcelonote dbus[621]: [system] Activating service name='org.freedesktop.PackageKit' (using servicehelper)
Jan 08 09:09:10 marcelonote AptDaemon[6017]: INFO: Initializing daemon
Jan 08 09:09:10 marcelonote org.freedesktop.PackageKit[621]: 09:09:10 AptDaemon [INFO]: Initializing daemon
Jan 08 09:09:10 marcelonote AptDaemon.PackageKit[6017]: INFO: Initializing PackageKit compat layer
Jan 08 09:09:10 marcelonote org.freedesktop.PackageKit[621]: 09:09:10 AptDaemon.PackageKit [INFO]: Initializing PackageKit compat layer
Jan 08 09:09:10 marcelonote dbus[621]: [system] Successfully activated service 'org.freedesktop.PackageKit'
Jan 08 09:09:10 marcelonote AptDaemon.PackageKit[6017]: INFO: CreateTransaction() was called
Jan 08 09:09:10 marcelonote org.freedesktop.PackageKit[621]: 09:09:10 AptDaemon.PackageKit [INFO]: CreateTransaction() was called
Jan 08 09:09:10 marcelonote AptDaemon.PackageKit[6017]: INFO: Initializing PackageKit transaction
Jan 08 09:09:10 marcelonote org.freedesktop.PackageKit[621]: 09:09:10 AptDaemon.PackageKit [INFO]: Initializing PackageKit transaction
Jan 08 09:09:10 marcelonote AptDaemon.PackageKit[6017]: INFO: GetUpdates() was called
Jan 08 09:09:10 marcelonote org.freedesktop.PackageKit[621]: 09:09:10 AptDaemon.PackageKit [INFO]: GetUpdates() was called
Jan 08 09:09:10 marcelonote AptDaemon.Worker[6017]: INFO: Simulating trans: /org/debian/apt/transaction/e86dea17ca9e4f5e9ecfa4703b955c61
Jan 08 09:09:10 marcelonote org.freedesktop.PackageKit[621]: 09:09:10 AptDaemon.Worker [INFO]: Simulating trans: /org/debian/apt/transaction/e8
Jan 08 09:09:10 marcelonote AptDaemon.Worker[6017]: INFO: Processing transaction /org/debian/apt/transaction/e86dea17ca9e4f5e9ecfa4703b955c61
Jan 08 09:09:10 marcelonote org.freedesktop.PackageKit[621]: 09:09:10 AptDaemon.Worker [INFO]: Processing transaction /org/debian/apt/transacti
Jan 08 09:09:13 marcelonote AptDaemon.Worker[6017]: INFO: Finished transaction /org/debian/apt/transaction/e86dea17ca9e4f5e9ecfa4703b955c61
Jan 08 09:09:13 marcelonote org.freedesktop.PackageKit[621]: 09:09:13 AptDaemon.Worker [INFO]: Finished transaction /org/debian/apt/transaction
Jan 08 09:10:07 marcelonote upowerd[1569]: (upowerd:1569): UPower-Linux-WARNING **: energy 26,833560 bigger than full 26,757575
Jan 08 09:12:07 marcelonote upowerd[1569]: (upowerd:1569): UPower-Linux-WARNING **: energy 26,920400 bigger than full 26,833560
Jan 08 09:12:22 marcelonote systemd[1]: Starting Cleanup of Temporary Directories...
-- Subject: Unit systemd-tmpfiles-clean.service has begun start-up

J'essaie de réinstaller apache, mais le problème persiste.

Running grep victor /etc/apache2 -R

/etc/apache2/envvars:export APACHE_RUN_USER=victor
/etc/apache2/envvars:export APACHE_RUN_GROUP=victor

2voto

nessim Points 1

Votre journal montre ceci : Jan 08 09:05:40 marcelonote apache2[5840]: chown: invalid user: 'victor'

Il semble qu'il n'existe pas d'utilisateur appelé Victor. Changez votre /etc/apache2/envvars APACHE_RUN_USER y APACHE_RUN_GROUP a www-data et redémarrez l'apache à nouveau.

-3voto

Michael Points 2259

Avez-vous essayé ceci, et entrez ceci depuis le terminal :

 cron apache2
 cron restart

et ça pourrait marcher comme ça.

SistemesEz.com

SystemesEZ est une communauté de sysadmins où vous pouvez résoudre vos problèmes et vos doutes. Vous pouvez consulter les questions des autres sysadmins, poser vos propres questions ou résoudre celles des autres.

Powered by:

X