# Arret d'apache sans raison

**URL:** <https://www.debian-fr.org/t/arret-dapache-sans-raison/86044>\
**Category:** Support Debian\
**Tags:** serveur, apache\
**Created:** [Janvier 27, 2022, 7:12 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044 "2022-01-27T07:12:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobylapointe](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@bobylapointe](https://www.debian-fr.org/u/bobylapointe)\
**Post date:** [Janvier 27, 2022, 7:12 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/1 "2022-01-27T07:12:33Z")

</div>

bjr,  
j’ai un petit server en prod et ce matin je n’avais plus de server web… et je ne comprends pas pourquoi !!! pouvez vous m’aider a comprendre ce qui s’est passer??? ma debian est a jour…  
et je ne vois rien dans mon syslog…mais je ne suis pas un pro…  
bug, attaque, tentative???  
Merci pour votre aide

---

<div class="post-metadata">

**Author:** ![Clochette](https://www.debian-fr.org/user_avatar/www.debian-fr.org/clochette/32/8757_2.png) [@Clochette](https://www.debian-fr.org/u/Clochette)\
**Post date:** [Janvier 27, 2022, 7:33 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/2 "2022-01-27T07:33:04Z")

</div>

Regarde les logs spécifique d’apache pour commencer et aussi tout ce qui touche au matériel pour voir si il y a pas eu un OOM.

---

<div class="post-metadata">

**Author:** ![Almtesh](https://www.debian-fr.org/user_avatar/www.debian-fr.org/almtesh/32/10312_2.png) [@Almtesh](https://www.debian-fr.org/u/Almtesh)\
**Post date:** [Janvier 27, 2022, 9:20 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/3 "2022-01-27T09:20:17Z")

</div>

La première chose à faire, c’est arrêter de paniquer. Assieds-toi, prends une grand inspiration et expire lentement pour faire redescendre la pression. La panique augmente énormément le risque de suraccident.  
Une fois que tu as fait ça, tu peux revenir ici avec des journaux et plus de détails sur le système.

---

<div class="post-metadata">

**Author:** ![bobylapointe](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@bobylapointe](https://www.debian-fr.org/u/bobylapointe)\
**Post date:** [Janvier 27, 2022, 10:21 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/4 "2022-01-27T10:21:46Z")

</div>

Ca correspond a quoi ca???

```nohighlight
Jan 26 23:30:10 Next dhclient[614]: No working leases in persistent database - sleeping.
Jan 26 23:30:45 Next systemd[1]: apache2.service: Main process exited, code=exited, status=1/FAILURE
Jan 26 23:30:45 Next systemd[1]: apache2.service: Killing process 1564401 (apache2) with signal SIGKILL.
Jan 26 23:30:45 Next systemd[1]: apache2.service: Killing process 1564402 (apache2) with signal SIGKILL.
Jan 26 23:30:45 Next systemd[1]: apache2.service: Failed with result 'exit-code'.
Jan 26 23:30:45 Next systemd[1]: apache2.service: Consumed 1h 56min 3.732s CPU time.

```

---

<div class="post-metadata">

**Author:** ![Sputnik93](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/s/35a633/32.png) [@Sputnik93](https://www.debian-fr.org/u/Sputnik93)\
**Post date:** [Janvier 27, 2022, 2:28 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/5 "2022-01-27T14:28:48Z")

</div>

Maintenant tu sais que c’est à 23:30:45 que ton serveur apache a été coupé.  
Regarde les logs spécifiques du service, autour de cette heure: `journalctl -u apache2`

---

<div class="post-metadata">

**Author:** ![bobylapointe](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@bobylapointe](https://www.debian-fr.org/u/bobylapointe)\
**Post date:** [Janvier 27, 2022, 3:06 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/6 "2022-01-27T15:06:45Z")

</div>

j’ai rien d’autre!!!

```nohighlight
janv. 26 20:39:33 Next postfix/smtpd[1562602]: 5415B15F6F9: client=localhost[127.0.0.1]
janv. 26 20:39:33 Next postfix/smtpd[1562602]: disconnect from localhost[127.0.0.1] helo=1 mail=1 rcpt=3 data=1 quit=1 commands=7
janv. 26 23:30:45 Next systemd[1]: apache2.service: Main process exited, code=exited, status=1/FAILURE
janv. 26 23:30:45 Next systemd[1]: apache2.service: Killing process 1564401 (apache2) with signal SIGKILL.
janv. 26 23:30:45 Next systemd[1]: apache2.service: Killing process 1564402 (apache2) with signal SIGKILL.
janv. 26 23:30:45 Next systemd[1]: apache2.service: Failed with result 'exit-code'.
janv. 26 23:30:45 Next systemd[1]: apache2.service: Consumed 1h 56min 3.732s CPU time.
janv. 27 07:18:33 Next systemd[1]: Starting The Apache HTTP Server...
janv. 27 07:18:33 Next systemd[1]: Started The Apache HTTP Server.

```

---

<div class="post-metadata">

**Author:** ![bobylapointe](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@bobylapointe](https://www.debian-fr.org/u/bobylapointe)\
**Post date:** [Janvier 27, 2022, 3:07 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/7 "2022-01-27T15:07:18Z")

</div>

7:18 c’est moi…

---

<div class="post-metadata">

**Author:** ![bobylapointe](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@bobylapointe](https://www.debian-fr.org/u/bobylapointe)\
**Post date:** [Janvier 27, 2022, 3:46 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/8 "2022-01-27T15:46:56Z")

</div>

```nohighlight
janv. 26 23:25:38 Next systemd[1]: Starting Certbot...
janv. 26 23:29:09 Next dhclient[614]: DHCPDISCOVER on eno1 to 255.255.255.255 port 67 interval 3
janv. 26 23:29:12 Next dhclient[614]: DHCPDISCOVER on eno1 to 255.255.255.255 port 67 interval 6
janv. 26 23:29:18 Next dhclient[614]: DHCPDISCOVER on eno1 to 255.255.255.255 port 67 interval 13
janv. 26 23:29:31 Next dhclient[614]: DHCPDISCOVER on eno1 to 255.255.255.255 port 67 interval 8
janv. 26 23:29:39 Next dhclient[614]: DHCPDISCOVER on eno1 to 255.255.255.255 port 67 interval 12
janv. 26 23:29:51 Next dhclient[614]: DHCPDISCOVER on eno1 to 255.255.255.255 port 67 interval 19
janv. 26 23:30:10 Next dhclient[614]: No DHCPOFFERS received.
janv. 26 23:30:10 Next dhclient[614]: No working leases in persistent database - sleeping.
janv. 26 23:30:45 Next systemd[1]: apache2.service: Main process exited, code=exited, status=1/FAILURE
janv. 26 23:30:45 Next systemd[1]: apache2.service: Killing process 1564401 (apache2) with signal SIGKILL.
janv. 26 23:30:45 Next systemd[1]: apache2.service: Killing process 1564402 (apache2) with signal SIGKILL.
janv. 26 23:30:45 Next systemd[1]: apache2.service: Failed with result 'exit-code'.
janv. 26 23:30:45 Next systemd[1]: apache2.service: Consumed 1h 56min 3.732s CPU time.
janv. 26 23:30:47 Next certbot[1564379]: Challenge failed for domain xxxxx.fr
janv. 26 23:30:47 Next certbot[1564379]: Challenge failed for domain www.xxxxx.fr
janv. 26 23:30:47 Next certbot[1564379]: Failed to renew certificate xxxxx.fr with error: Some challenges have failed.
janv. 26 23:30:51 Next certbot[1564379]: All renewals failed. The following certificates could not be renewed:
janv. 26 23:30:51 Next certbot[1564379]: /etc/letsencrypt/live/xxxxx.fr/fullchain.pem (failure)
janv. 26 23:30:51 Next certbot[1564379]: 1 renew failure(s), 0 parse failure(s)
janv. 26 23:30:51 Next systemd[1]: certbot.service: Main process exited, code=exited, status=1/FAILURE
janv. 26 23:30:52 Next systemd[1]: certbot.service: Failed with result 'exit-code'.
janv. 26 23:30:52 Next systemd[1]: Failed to start Certbot.
janv. 26 23:30:52 Next systemd[1]: certbot.service: Consumed 5.697s CPU time.
janv. 26 23:33:47 Next dhclient[614]: DHCPDISCOVER on eno1 to 255.255.255.255 port 67 interval 5

```

cerbot serait l’erreur… je ne vois pas pourquoi apache a stoper…

---

<div class="post-metadata">

**Author:** ![Clochette](https://www.debian-fr.org/user_avatar/www.debian-fr.org/clochette/32/8757_2.png) [@Clochette](https://www.debian-fr.org/u/Clochette)\
**Post date:** [Janvier 27, 2022, 4:50 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/9 "2022-01-27T16:50:40Z")

</div>

Au vue du log ce ne serait pas ton Certbot qui aurait stopper ton apache, par contre à savoir pourquoi il ne l’a pas redémarré ?

Si tu le fais à l’aide d’une tâche cron comme ça,

```auto
/usr/bin/certbot renew --pre-hook "systemctl stop apache2" --post-hook "systemctl start apache2"

```

et que le renouvellement ai échoué, il serait du coup logique qu’il n’est pas redémarré ton apache … à voir

---

<div class="post-metadata">

**Author:** ![bobylapointe](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@bobylapointe](https://www.debian-fr.org/u/bobylapointe)\
**Post date:** [Janvier 27, 2022, 5:04 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/10 "2022-01-27T17:04:41Z")

</div>

oui je suis d’acccord avec toi

---

<div class="post-metadata">

**Author:** ![Zargos](https://www.debian-fr.org/user_avatar/www.debian-fr.org/zargos/32/10889_2.png) [@Zargos](https://www.debian-fr.org/u/Zargos)\
**Post date:** [Janvier 27, 2022, 11:05 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/11 "2022-01-27T23:05:44Z")

</div>

C’est simple, pas d’adresse DHCP fournie au client, donc pas de bind du serveur apache, seul l(interface lo est disponible:

> [@bobylapointe](#):
>
> ```plaintext
> Jan 26 23:30:10 Next dhclient[614]: No working leases in persistent database - sleeping.
> 
> ```

> [@bobylapointe](#):
>
> `janv. 26 23:30:10 Next dhclient[614]: No DHCPOFFERS received.`

---

<div class="post-metadata">

**Author:** ![bobylapointe](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@bobylapointe](https://www.debian-fr.org/u/bobylapointe)\
**Post date:** [Janvier 28, 2022, 4:41 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/12 "2022-01-28T04:41:50Z")

</div>

Mais dans mon cas c’est pas cas…je suis en ip fixe j’ai simple bloqué les communications dans le serveur DHCP…et mon server était tjrs accessible avec ssh…donc c’est pas ça…

---

<div class="post-metadata">

**Author:** ![anon70622873](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/a/278dde/32.png) [@anon70622873](https://www.debian-fr.org/u/anon70622873)\
**Post date:** [Janvier 28, 2022, 9:17 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/13 "2022-01-28T09:17:49Z")

</div>

Bonjour,

Montre-nous :

```auto
systemctl list-timers

```

Les logs de certbot (/var/log/letsencrypt/letsencrypt.log) au moment où cela foire.  
Dis-nous si tu as modifié des fichiers de configuration de certbot ou sa tâche cron.

Et il y a sans doute un problème au niveau de la configuration réseau : ce n’est pas normal que la carte eno1 cherche à obtenir une IP en DHCP si elle a une IP fixe.

---

<div class="post-metadata">

**Author:** ![bobylapointe](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@bobylapointe](https://www.debian-fr.org/u/bobylapointe)\
**Post date:** [Janvier 28, 2022, 9:29 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/14 "2022-01-28T09:29:10Z")

</div>

```nohighlight
systemctl list-timers
NEXT LEFT LAST PASSED UNIT ACTIVATES
Fri 2022-01-28 10:39:00 CET 10min left Fri 2022-01-28 10:09:02 CET 19min ago phpsessionclean.timer phpsessionclean.service
Fri 2022-01-28 13:13:05 CET 2h 44min left Thu 2022-01-27 13:13:05 CET 21h ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
Fri 2022-01-28 14:47:34 CET 4h 19min left Thu 2022-01-27 21:42:25 CET 12h ago apt-daily.timer apt-daily.service
Fri 2022-01-28 21:59:51 CET 11h left Fri 2022-01-28 04:45:10 CET 5h 43min ago certbot.timer certbot.service
Sat 2022-01-29 00:00:00 CET 13h left Fri 2022-01-28 00:00:00 CET 10h ago logrotate.timer logrotate.service
Sat 2022-01-29 00:00:00 CET 13h left Fri 2022-01-28 00:00:00 CET 10h ago man-db.timer man-db.service
Sat 2022-01-29 00:24:16 CET 13h left Fri 2022-01-28 00:20:38 CET 10h ago lynis.timer lynis.service
Sat 2022-01-29 06:11:33 CET 19h left Fri 2022-01-28 06:22:21 CET 4h 6min ago apt-daily-upgrade.timer apt-daily-upgrade.service
Sun 2022-01-30 03:10:17 CET 1 day 16h left Sun 2022-01-23 03:10:42 CET 5 days ago e2scrub_all.timer e2scrub_all.service

9 timers listed.
Pass --all to see loaded but inactive timers, too.

```

---

<div class="post-metadata">

**Author:** ![bobylapointe](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@bobylapointe](https://www.debian-fr.org/u/bobylapointe)\
**Post date:** [Janvier 28, 2022, 9:34 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/15 "2022-01-28T09:34:56Z")

</div>

```nohighlight
 /etc/letsencrypt/live/xxxxxx.com/fullchain.pem expires on 2022-03-29 (skipped)
2022-01-26 23:30:51,654:ERROR:certbot._internal.renewal:All renewals failed. The following certificates could not be renewed:
2022-01-26 23:30:51,655:ERROR:certbot._internal.renewal: /etc/letsencrypt/live/XXXXXX.fr/fullchain.pem (failure)
2022-01-26 23:30:51,655:DEBUG:certbot.display.util:Notifying user: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2022-01-26 23:30:51,656:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
  File "/usr/bin/certbot", line 33, in <module>
    sys.exit(load_entry_point('certbot==1.12.0', 'console_scripts', 'certbot')())
  File "/usr/lib/python3/dist-packages/certbot/main.py", line 15, in main
    return internal_main.main(cli_args)
  File "/usr/lib/python3/dist-packages/certbot/_internal/main.py", line 1413, in main
    return config.func(config, plugins)
  File "/usr/lib/python3/dist-packages/certbot/_internal/main.py", line 1317, in renew
    renewal.handle_renewal_request(config)
  File "/usr/lib/python3/dist-packages/certbot/_internal/renewal.py", line 510, in handle_renewal_request
    raise errors.Error("{0} renew failure(s), {1} parse failure(s)".format(
certbot.errors.Error: 1 renew failure(s), 0 parse failure(s)
2022-01-26 23:30:51,658:ERROR:certbot._internal.log:1 renew failure(s), 0 parse failure(s)
2022-01-27 00:55:01,540:DEBUG:certbot._internal.main:certbot version: 1.12.0
2022-01-27 00:55:01,541:DEBUG:certbot._internal.main:Location of certbot entry point: /usr/bin/certbot
2022-01-27 00:55:01,541:DEBUG:certbot._internal.main:Arguments: ['-q']
2022-01-27 00:55:01,541:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,Pl>
2022-01-27 00:55:01,568:DEBUG:certbot._internal.log:Root logging level set at 30
2022-01-27 00:55:01,568:INFO:certbot._internal.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log

```

---

<div class="post-metadata">

**Author:** ![bobylapointe](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@bobylapointe](https://www.debian-fr.org/u/bobylapointe)\
**Post date:** [Janvier 28, 2022, 9:37 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/16 "2022-01-28T09:37:20Z")

</div>

a 12h00 j’ai un script qui fait

```auto
#!/bin/bash
certbot renew && service apache2 reload

```

---

<div class="post-metadata">

**Author:** ![Zargos](https://www.debian-fr.org/user_avatar/www.debian-fr.org/zargos/32/10889_2.png) [@Zargos](https://www.debian-fr.org/u/Zargos)\
**Post date:** [Janvier 28, 2022, 10:17 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/17 "2022-01-28T10:17:10Z")

</div>

> [@bobylapointe](#):
>
> Mais dans mon cas c’est pas cas…je suis en ip fixe j’ai simple bloqué les communications dans le serveur DHCP

Ce n’est pas au niveau du serveur que cela se fait mais au niveau client.  
Le système DHCP est un protocole dont les communication sont gérées par le client. Donc c’est au client d’arrêter de demander une adresse DHCP.

---

<div class="post-metadata">

**Author:** ![anon70622873](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/a/278dde/32.png) [@anon70622873](https://www.debian-fr.org/u/anon70622873)\
**Post date:** [Janvier 28, 2022, 10:19 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/18 "2022-01-28T10:19:37Z")

</div>

Tu n’as pas besoin de ce script le paquet certbot installe la tâche cron (sous /etc/cron.d) et les timer et service systemd qui vont bien. Si le redémarrage d’Apache est nécessire il ne faut pas le placer là, mais dans un fichier sous /etc/letsencrypt/renewal-hooks/deploy/ (ou utiliser --deploy-hook)

Le renouvellement d’un certificat échoue mais on ne sait pas pourquoi. Il faut essayer en ligne de commande pour voir ce qui cloche :

```auto
certbot --dry-run renew

```

---

<div class="post-metadata">

**Author:** ![bobylapointe](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@bobylapointe](https://www.debian-fr.org/u/bobylapointe)\
**Post date:** [Janvier 28, 2022, 10:43 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/19 "2022-01-28T10:43:39Z")

</div>

effectivement j’ai des erreurs sur les noms de domaine…

```nohighlight
Cert not due for renewal, but simulating renewal for dry run
Plugins selected: Authenticator apache, Installer apache
Simulating renewal of an existing certificate for xxxx.fr and www.xxxxx.fr
Performing the following challenges:
http-01 challenge for xxx.fr
http-01 challenge for www.xxxx.fr
Waiting for verification...
Challenge failed for domain www.xxxxx.fr
Challenge failed for domain xxxx.fr
http-01 challenge for www.xxxxx.fr
http-01 challenge for xxxx.fr
Cleaning up challenges
Failed to renew certificate xxxxx.fr with error: Some challenges have failed.

```

---

<div class="post-metadata">

**Author:** ![anon70622873](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/a/278dde/32.png) [@anon70622873](https://www.debian-fr.org/u/anon70622873)\
**Post date:** [Janvier 28, 2022, 11:34 UTC](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044/20 "2022-01-28T11:34:14Z")

</div>

Il n’y a pas plus d’informations que cela ?  
Peut-être qu’il y a d’autres infos dans les logs.  
Il faut commencer par vérifier que Apache est bien lancé et que [xxx.fr](http://xxx.fr) et [www.xxx.fr](http://www.xxx.fr) (pourquoi cacher le nom de domaine?) pointent bien vers ton IP.

[Page suivante](https://www.debian-fr.org/t/arret-dapache-sans-raison/86044.md?page=2)
