opensearch-build: [BUG] Post script for Debian returns 255

Describe the bug I’m try to install opensearch via the apt package (first I add it to a new apt list like mentioned in the documentation):

root@machine:~# apt install opensearch
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Die folgenden NEUEN Pakete werden installiert:
  opensearch
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen noch 0 B von 758 MB an Archiven heruntergeladen werden.
Nach dieser Operation werden 987 MB Plattenplatz zusätzlich benutzt.
Vormals nicht ausgewähltes Paket opensearch wird gewählt.
(Lese Datenbank ... 28468 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../opensearch_2.5.0_amd64.deb ...
Running OpenSearch Pre-Installation Script
Entpacken von opensearch (2.5.0) ...
opensearch (2.5.0) wird eingerichtet ...
Running OpenSearch Post-Installation Script
dpkg: Fehler beim Bearbeiten des Paketes opensearch (--configure):
 »installiertes opensearch-Skript des Paketes post-installation«-Unterprozess gab den Fehlerwert 255 zurück
Trigger für libc-bin (2.31-13+deb11u5) werden verarbeitet ...
Fehler traten auf beim Bearbeiten von:
 opensearch
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@machine:~# 

To Reproduce Steps to reproduce the behavior:

  1. add apt list for opensearch to debian
  2. run apt install opensearch

Expected behavior opensearch should be installed

Plugins none

Host/Environment (please complete the following information):

  • OS: Debian
  • Version: 11

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 23 (15 by maintainers)

Most upvoted comments

@peterzhuamazon many thanks for the quick response and for fixing the problem!

I tried this in a Linux container (Debian 11). The locale does not matter.

As already assumed by @peterzhuamazon, it is probably the file /usr/lib/sysctl.d/opensearch.conf in which the setting sysctl -w vm.max_map_count=262144 is in.

Even if I give the container more rights with:

lxc config set debian security.privileged true
lxc config set debian security.nesting true

it does not solve the problem.

If I remove line vm.max_map_count=262144 from the file, I can complete the installation via apt-get install -f.

The container, unless it is virtualized, inherits this setting from the host system.