web-dev-qa-db-fra.com

Apache2 ne recharge pas / ne redémarre pas (erreur org.freedesktop.PolicyKit1)

L'erreur affichée est:

Failed to reload Apache2.service: The name org.freedesktop.PolicyKit1 was not provided by 
any .service files See system logs and 'systemctl status Apache2.service' for details.

J'ai exécuté les deux commandes suivantes et voici les journaux renvoyés, respectivement:

systemctl status Apache2.service
journalctl -xe

Journaux:

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: active (running) since Tue 2017-02-21 18:41:29 IST; 33min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 14374 ExecStop=/etc/init.d/Apache2 stop (code=exited, status=0/SUCCESS
  Process: 14396 ExecStart=/etc/init.d/Apache2 start (code=exited, status=0/SUCCE
   CGroup: /system.slice/Apache2.service
           ├─14414 /usr/sbin/Apache2 -k start
           ├─14417 /usr/sbin/Apache2 -k start
           └─14418 /usr/sbin/Apache2 -k start

journalctl -xe

-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit Apache2.service has begun starting up.
Feb 21 18:41:28 oxygen Apache2[14396]:  * Starting Apache httpd web server Apache2
Feb 21 18:41:28 oxygen Apache2[14396]: [Tue Feb 21 18:41:28.950705 2017] [core:error] [pid 14413:tid 140406115329920] (EAI 2)Name or service not known: AH00547: Could n
Feb 21 18:41:28 oxygen Apache2[14396]: AH00558: Apache2: Could not reliably determine the server's fully qualified domain name, using 45.56.70.225. Set the 'ServerName'
Feb 21 18:41:29 oxygen Apache2[14396]:  *
Feb 21 18:41:29 oxygen systemd[1]: Started LSB: Apache2 web server.
-- Subject: Unit Apache2.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit Apache2.service has finished starting up.
--
-- The start-up result is done.
Feb 21 18:41:48 oxygen Sudo[14475]:     root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/sbin/a2ensite indiairapp.com.cong
Feb 21 18:41:48 oxygen Sudo[14475]: pam_unix(Sudo:session): session opened for user root by root(uid=0)
Feb 21 18:41:48 oxygen Sudo[14475]: pam_unix(Sudo:session): session closed for user root
Feb 21 18:41:51 oxygen Sudo[14480]:     root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/sbin/a2ensite indiairapp.com.conf
Feb 21 18:41:51 oxygen Sudo[14480]: pam_unix(Sudo:session): session opened for user root by root(uid=0)
Feb 21 18:41:51 oxygen Sudo[14480]: pam_unix(Sudo:session): session closed for user root
Feb 21 18:45:01 oxygen CRON[14492]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 21 18:45:01 oxygen CRON[14493]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 21 18:45:01 oxygen CRON[14492]: pam_unix(cron:session): session closed for user root
Feb 21 18:47:01 oxygen CRON[14495]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 21 18:47:01 oxygen CRON[14496]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 21 18:47:01 oxygen CRON[14495]: pam_unix(cron:session): session closed for user root
Feb 21 18:55:01 oxygen CRON[14498]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 21 18:55:01 oxygen CRON[14499]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 21 18:55:01 oxygen CRON[14498]: pam_unix(cron:session): session closed for user root
Feb 21 18:58:59 oxygen Sudo[14518]:  nauman3 : TTY=pts/3 ; PWD=/etc/Apache2/sites-available ; USER=root ; COMMAND=/bin/nano /etc/Apache2/sites-available/indiairapp.conf
Feb 21 18:58:59 oxygen Sudo[14518]: pam_unix(Sudo:session): session opened for user root by nauman3(uid=0)
Feb 21 19:00:45 oxygen Sudo[14518]: pam_unix(Sudo:session): session closed for user root
Feb 21 19:00:49 oxygen Sudo[14520]:  nauman3 : TTY=pts/3 ; PWD=/etc/Apache2/sites-available ; USER=root ; COMMAND=/usr/sbin/a2ensite indiairapp.conf
Feb 21 19:00:49 oxygen Sudo[14520]: pam_unix(Sudo:session): session opened for user root by nauman3(uid=0)
Feb 21 19:00:49 oxygen Sudo[14520]: pam_unix(Sudo:session): session closed for user root
Feb 21 19:05:01 oxygen CRON[14534]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 21 19:05:01 oxygen CRON[14535]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 21 19:05:01 oxygen CRON[14534]: pam_unix(cron:session): session closed for user root
Feb 21 19:15:01 oxygen CRON[14547]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 21 19:15:01 oxygen CRON[14548]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 21 19:15:01 oxygen CRON[14547]: pam_unix(cron:session): session closed for user root
11
Nauman Crescendo

C'est un problème d'autorisation avec le Apache server la commande systemctldevrait être exécutée avec les privilèges rootname__:

Sudo systemctl reload Apache2
18
George Udosen

Essayer

Sudo Apache2ctl configtest

Cela devrait vous donner une meilleure idée des problèmes actuels.

(Peut-être lié: Apache ne peut pas redémarrer )

0
Jack Frost