Page 1 sur 1

[apache] ne fonctionne pas après un reboot (résolu)

Publié : sam. 04 févr. 2017, 10:16
par Sirilldu
Bonjour,
Depuis plusieurs jours, apache ne démarre pas correctement suite à un reboot du VPS.
Je pense que c'est suite à une mise à jour.
Il faut faire un # systemctl restart httpd pour qu'il fonctionne correctement.

Suite au reboot, j'ai cette erreur :

Code : Tout sélectionner

$ sc-status -l httpd
● httpd.service - Apache Web Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2017-02-04 09:56:12 CET; 4min 39s ago
 Main PID: 209 (httpd)
    Tasks: 7 (limit: 4915)
   CGroup: /system.slice/httpd.service
           ├─209 /usr/bin/httpd -k start -DFOREGROUND
           ├─292 /usr/bin/httpd -k start -DFOREGROUND
           ├─299 /usr/bin/httpd -k start -DFOREGROUND
           ├─300 /usr/bin/httpd -k start -DFOREGROUND
           ├─301 /usr/bin/httpd -k start -DFOREGROUND
           ├─313 /usr/bin/httpd -k start -DFOREGROUND
           └─356 /usr/bin/httpd -k start -DFOREGROUND

févr. 04 09:56:12 vps301757.ovh.net httpd[209]: [Sat Feb 04 09:56:12.725300 2017] [core:error] [pid 209] (EAI 2)Name or service not known: AH00547: Could not resolve host name rss.cyrillinux.fr -- ignoring!
févr. 04 09:56:12 vps301757.ovh.net httpd[209]: [Sat Feb 04 09:56:12.726545 2017] [core:error] [pid 209] (EAI 2)Name or service not known: AH00547: Could not resolve host name rss.cyrillinux.fr -- ignoring!
févr. 04 09:56:12 vps301757.ovh.net httpd[209]: [Sat Feb 04 09:56:12.727146 2017] [core:error] [pid 209] (EAI 2)Name or service not known: AH00547: Could not resolve host name gal.cyrillinux.fr -- ignoring!
févr. 04 09:56:12 vps301757.ovh.net httpd[209]: [Sat Feb 04 09:56:12.729135 2017] [core:error] [pid 209] (EAI 2)Name or service not known: AH00547: Could not resolve host name gal.cyrillinux.fr -- ignoring!
févr. 04 09:56:12 vps301757.ovh.net httpd[209]: [Sat Feb 04 09:56:12.729973 2017] [core:error] [pid 209] (EAI 2)Name or service not known: AH00547: Could not resolve host name discu.cyrillinux.fr -- ignoring!
févr. 04 09:56:12 vps301757.ovh.net httpd[209]: [Sat Feb 04 09:56:12.733641 2017] [core:error] [pid 209] (EAI 2)Name or service not known: AH00547: Could not resolve host name discu.cyrillinux.fr -- ignoring!
févr. 04 09:56:12 vps301757.ovh.net httpd[209]: [Sat Feb 04 09:56:12.734579 2017] [core:error] [pid 209] (EAI 2)Name or service not known: AH00547: Could not resolve host name gepro.cyrillinux.fr -- ignoring!
févr. 04 09:56:12 vps301757.ovh.net httpd[209]: [Sat Feb 04 09:56:12.736639 2017] [core:error] [pid 209] (EAI 2)Name or service not known: AH00547: Could not resolve host name gepro.cyrillinux.fr -- ignoring!
févr. 04 09:56:12 vps301757.ovh.net httpd[209]: [Sat Feb 04 09:56:12.737250 2017] [core:error] [pid 209] (EAI 2)Name or service not known: AH00547: Could not resolve host name cyrillinux.fr -- ignoring!
févr. 04 09:56:12 vps301757.ovh.net httpd[209]: [Sat Feb 04 09:56:12.737853 2017] [core:error] [pid 209] (EAI 2)Name or service not known: AH00547: Could not resolve host name www.cyrillinux.fr -- ignoring!
Sur le forum anglais, j'ai trouvé une discussion avec le même problème : https://bbs.archlinux.org/viewtopic.php?id=218701
La solution consiste à modifier le service d'apache, mais je ne trouve pas cela élégant.
Qu'en pensez-vous ?

Edit : l'ajout des domaines dans /etc/hosts ne donne rien

Edit2 : J'ai trouvé la solution. Le problème vient des vhost.
J'avais <VirtualHost mon_domaine:443> en mettant <VirtualHost *:443> résout le problème

Re: [apache] ne fonctionne pas après un reboot (résolu)

Publié : sam. 04 févr. 2017, 11:24
par Sirilldu
Faudrait peut-être modifier la doc : https://wiki.archlinux.org/index.php/Ap ... tual_hosts

Re: [apache] ne fonctionne pas après un reboot (résolu)

Publié : sam. 04 févr. 2017, 12:34
par benjarobin
Non la documentation est juste, il y a un bug quelque part...
Tu as quoi comme service réseau ?
Je vais creuser un peu le sujet car cela m'intéresse https://www.freedesktop.org/wiki/Softwa ... orkTarget/

Re: [apache] ne fonctionne pas après un reboot (résolu)

Publié : sam. 04 févr. 2017, 12:42
par Sirilldu
J'ai systemd-networkd.
J'ai modifié mes vhost après avoir lu cette doc : https://wiki.apache.org/httpd/CommonMis ... _interface.

Peut-être qu'un systemctl enable systemd-networkd-wait-online.service aurai résolu le problème.

Re: [apache] ne fonctionne pas après un reboot (résolu)

Publié : sam. 04 févr. 2017, 12:54
par benjarobin
Ah oui en effet... Le wiki est faux, je me demande si ma configuration est juste d'ailleurs