oct. 05 15:31:49 woscar-pp systemd-entrypoint[602]: WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
oct. 05 15:31:49 woscar-pp systemd-entrypoint[602]: WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by com.google.protobuf.UnsafeUtil$MemoryAccessor (file:/usr/share/elasticsearch/
oct. 05 15:31:49 woscar-pp systemd-entrypoint[602]: WARNING: Please consider reporting this to the maintainers of class com.google.protobuf.UnsafeUtil$MemoryAccessor
oct. 05 15:31:49 woscar-pp systemd-entrypoint[602]: WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release
oct. 05 15:31:57 woscar-pp systemd-entrypoint[602]: ERROR: Elasticsearch did not exit normally - check the logs at /var/log/elasticsearch/oscar-elastic.log
oct. 05 15:31:59 woscar-pp systemd-entrypoint[602]: Elasticsearch died while starting up, exit code: 78
oct. 05 15:31:59 woscar-pp systemd[1]: elasticsearch.service: Main process exited, code=exited, status=78/CONFIG
oct. 05 15:31:59 woscar-pp systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
[1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch. For more information see [https://www.elastic.co/docs/deploy-mana
bootstrap check failure [1] of [1]: memory locking requested for elasticsearch process but memory is not locked; for more information see [https://www.elastic.co/docs/deploy-manage/deploy/se
On cherche la ligne `[ERROR]`, elle nous précise la cause de l'erreur : *memory locking requested for elasticsearch process but memory is not locked*
En gros, soucis de mémoire
On regarde si une limite est fixée par **systemd** :
```
systemctl show elasticsearch.service | grep -i LimitMEMLOCK
```
Affiche un truc du style :
```
LimitMEMLOCK=8388608
LimitMEMLOCKSoft=8388608
```
Soit **8Mo**, c'est peu car on peut voir dans le log Elastic (`tail -100 /var/log/elasticsearch/oscar-elastic.log) que Elascticsearch a un *heap* de 1g9 (Cette valeur vient de la configuration d'Elasticsearch) :
```
[2026-10-06T15:34:46,036][INFO ][o.e.e.NodeEnvironment ] [oscar-node-1] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [3.5gb], net total_space [23.6gb], types [ext4]
[2026-10-06T15:34:46,084][INFO ][o.e.n.Node ] [oscar-node-1] node name [oscar-node-1], node ID [9Hpy-sFqTIairEKDR4BaCg], cluster name [oscar-elastic], roles [ingest, data_froze
n, ml, data_hot, transform, data_content, data_warm, master, remote_cluster_client, data, data_cold]
```
**CORRECTIF**
On va surcharger la configuration de Elasticsearch dans systemd :
```bash
systemctl edit elasticsearch.service
```
```ini
[Service]
LimitMEMLOCK=infinity
```
> Attention, bien modifier la configuration dans la "zone commentée" sinon elle ne sera pas prise en compte, je me suis fait avoir :P
> Si vous êtes sur un système strict qui n'autorise pas `LimitMEMLOCK=infinity`, renseignez un valeur supérieur à la taille du *heap* d'elastic, par exemple :
> ```ini
> [Service]
> LimitMEMLOCK=2G
> ```
Puis on recharge :
```bash
sudo systemctl daemon-reload
```
On vérifie que c'est bien pris en compte :
```bash
systemctl show elasticsearch.service | grep -i LimitMEMLOCK