Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 940335 - app-misc/elasticsearch-8.15 is not working on system without systemd
Summary: app-misc/elasticsearch-8.15 is not working on system without systemd
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Matt Jolly
URL: https://github.com/elastic/elasticsea...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-27 08:17 UTC by j4Hu
Modified: 2024-10-03 07:07 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description j4Hu 2024-09-27 08:17:03 UTC
on system with openrc, without systemd and systemd libraries (libsystemd), elasticsearch will not start, because bootstrap checks uses libsystemd.

reported ass issue in upstream:
https://github.com/elastic/elasticsearch/issues/113666


[2024-09-27T09:48:16,694][WARN ][o.e.n.NativeAccess       ] host] Unable to load native provider. Native methods will be disabled.
java.lang.UnsatisfiedLinkError: Could not find libsystemd in java.library.path: /usr/share/elasticsearch/lib/platform/linux-x64:/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
at org.elasticsearch.nativeaccess.jdk.JdkSystemdLibrary.<clinit>(JdkSystemdLibrary.java:43) ~[elasticsearch-native-8.15.1.jar:?]
at org.elasticsearch.nativeaccess.lib.NativeLibraryProvider.getLibrary(NativeLibraryProvider.java:58) ~[elasticsearch-native-8.15.1.jar:?]
at org.elasticsearch.nativeaccess.LinuxNativeAccess.<init>(LinuxNativeAccess.java:20) ~[elasticsearch-native-8.15.1.jar:?]
at org.elasticsearch.nativeaccess.NativeAccessHolder.<clinit>(NativeAccessHolder.java:28) ~[elasticsearch-native-8.15.1.jar:?]
at org.elasticsearch.nativeaccess.NativeAccess.instance(NativeAccess.java:22) ~[elasticsearch-native-8.15.1.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch.initializeNatives(Elasticsearch.java:285) ~[elasticsearch-8.15.1.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch.initPhase2(Elasticsearch.java:170) ~[elasticsearch-8.15.1.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:75) ~[elasticsearch-8.15.1.jar:?]
[2024-09-27T09:48:16,753][WARN ][o.e.n.NativeAccess       ] host] Cannot check if running as root because native access is not available



    
[2024-09-27T09:46:04,056][INFO ][o.e.b.BootstrapChecks    ] host] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2024-09-27T09:46:04,062][WARN ][o.e.n.NativeAccess       ] host] Cannot get process limits because native access is not available
[2024-09-27T09:46:04,063][WARN ][o.e.n.NativeAccess       ] host] Cannot get process limits because native access is not available
[2024-09-27T09:46:04,064][WARN ][o.e.n.NativeAccess       ] host] Cannot get process limits because native access is not available
[2024-09-27T09:46:04,064][WARN ][o.e.n.NativeAccess       ] host] Cannot get process limits because native access is not available
[2024-09-27T09:46:04,066][WARN ][o.e.n.NativeAccess       ] host] Cannot get process limits because native access is not available
[2024-09-27T09:46:04,066][WARN ][o.e.n.NativeAccess       ] host] Cannot get process limits because native access is not available
[2024-09-27T09:46:04,079][ERROR][o.e.b.Elasticsearch      ] host] node validation exception
[2] bootstrap checks failed. You must address the points described in the following [2] lines before starting Elasticsearch. For more information see [https://www.elastic.co/guide/en/elasticsearch/reference/8.15/bootstrap-check
s.html]
bootstrap check failure [1] of [2]: max size virtual memory [-1] for user [elasticsearch] is too low, increase to [unlimited]; for more information see [https://www.elastic.co/guide/en/elasticsearch/reference/8.15/max-size-virt
ual-memory-check.html]
bootstrap check failure [2] of [2]: max file size [-1] for user [elasticsearch] is too low, increase to [unlimited]; for more information see [https://www.elastic.co/guide/en/elasticsearch/reference/8.15/_max_file_size_check.ht
ml]
[2024-09-27T09:46:04,095][INFO ][o.e.n.Node               ] host] stopping ...
[2024-09-27T09:46:04,148][INFO ][o.e.n.Node               ] host] stopped
[2024-09-27T09:46:04,149][INFO ][o.e.n.Node               ] host] closing ...
[2024-09-27T09:46:04,182][INFO ][o.e.n.Node               ] host] closed


Reproducible: Always

Steps to Reproduce:
1. emerge -v '>=app-misc/elasticsearch-8.15'
2. /etc/init.d/elasticsearch start
3. service is stopped after bootstrap checks


Expected Results:  
elasticsearch should have systemd requirements. i dont know if there is possibility to run elasticsearch without it from version 8.15.


# emerge --info
Portage 3.0.65 (python 3.12.6-final-0, default/linux/amd64/23.0/split-usr/no-multilib/hardened, gcc-13, glibc-2.39-r6, 6.9.12-gentoo-y20 x86_64)
=================================================================
System uname: Linux-6.9.12-gentoo-y20-x86_64-Intel-R-_Xeon-R-_CPU_E5-2630_v3_@_2.40GHz-with-glibc2.39
KiB Mem:     4040052 total,   1232552 free
KiB Swap:    2097148 total,   1652600 free
Timestamp of repository gentoo: Thu, 26 Sep 2024 22:00:00 +0000
Head commit of repository gentoo: 7eba3af91f1fd96ebb7491890479e7aef6c649ac
sh bash 5.2_p26-r6
ld GNU ld (Gentoo 2.42 p3) 2.42.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26-r6::gentoo
dev-build/autoconf:        2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.30.2::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.5.1::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.12.6_p2::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54.2::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-devel/binutils:        2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/gcc:             13.3.1_p20240614::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-kernel/linux-headers:  6.9::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r6::gentoo
Repositories:

gentoo
location: /usr/portage
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
volatile: True
sync-rsync-verify-metamanifest: yes
sync-rsync-verify-max-age: 3
sync-rsync-verify-jobs: 1
sync-rsync-extra-opts:

ybaca_local
location: /usr/portage/local/overlay
masters: gentoo
priority: 0
volatile: True

Binary Repositories:

binhost
priority: 10
sync-uri: https://mirror.wheel.sk/gentoo/releases/amd64/binpackages/17.1/x86-64-v3

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=x86-64-v3 -mtune=native -g -O3 -pipe -fasynchronous-unwind-tables -ftree-loop-vectorize -ftree-loop-distribute-patterns -fno-semantic-interposition -fno-trapping-math -ffat-lto-objects -fexceptions -feliminate-unused-debug-types -fgraphite-identity -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Wp,-D_REENTRANT -Wl,-z -Wl,now -Wl,-z -Wl,relro -Wl,-sort-common -Wl,--enable-new-dtags"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/asciidoc /etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/init.d /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=x86-64-v3 -mtune=native -g -O3 -pipe -fasynchronous-unwind-tables -ftree-loop-vectorize -ftree-loop-distribute-patterns -fno-semantic-interposition -fno-trapping-math -ffat-lto-objects -fexceptions -feliminate-unused-debug-types -fgraphite-identity -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Wp,-D_REENTRANT -Wl,-z -Wl,now -Wl,-z -Wl,relro -Wl,-sort-common -Wl,--enable-new-dtags -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles/"
EMERGE_DEFAULT_OPTS=" --fail-clean  --nospinner --keep-going --quiet-build  --binpkg-respect-use --usepkg=y  --load-average=4 --jobs "
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-g -O3 -pipe -fasynchronous-unwind-tables -ftree-loop-vectorize -ftree-loop-distribute-patterns -fno-semantic-interposition -fno-trapping-math -ffat-lto-objects -fexceptions -feliminate-unused-debug-types -fgraphite-identity -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Wp,-D_REENTRANT -Wl,-z -Wl,now -Wl,-z -Wl,relro -Wl,-sort-common -Wl,--enable-new-dtags -ftree-vectorize"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live config-protect-if-modified distlocks downgrade-backup ebuild-locks fail-clean fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news nodoc noinfo parallel-fetch pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-g -O3 -pipe -fasynchronous-unwind-tables -ftree-loop-vectorize -ftree-loop-distribute-patterns -fno-semantic-interposition -fno-trapping-math -ffat-lto-objects -fexceptions -feliminate-unused-debug-types -fgraphite-identity -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Wp,-D_REENTRANT -Wl,-z -Wl,now -Wl,-z -Wl,relro -Wl,-sort-common -Wl,--enable-new-dtags -ftree-vectorize"
GENTOO_MIRRORS="http://ftp.fi.muni.cz/pub/linux/gentoo/ rsync://ftp.fi.muni.cz/pub/linux/gentoo/ https://mirror.dkm.cz/gentoo/ rsync://mirror.dkm.cz/gentoo/ https://mirror.wheel.sk/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages/epyc73_O3"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="acl aio amd64 audit berkdb bzip2 caps cet crypt gdbm hardened iconv io-uring ipv6 ithreads libtirpc logrotate lto ncurses nls openmp pam pax-kernel pcre pgo pic pie readline seccomp split-usr ssl ssp test-rust threads unicode vim-syntax xattr xtpax xxhash zlib zstd" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="alias auth_basic authn_alias authn_anon authn_default authn_file authz_default authz_groupfile authz_host authz_user autoindex dir env expires filter info log_config logio mime mime_magic rewrite setenvif status vhost_alias reqtimeout authn_core authz_core unixd socache_shmcb access_compat deflate reqtimeout headers ratelimit" APACHE2_MPMS="event" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc"GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en sk" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PERL_FEATURES="ithreads" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 j4Hu 2024-09-27 08:26:18 UTC
even with native access lib turned of, bootsrap checks fails:
ES_JAVA_OPTS="$ES_JAVA_OPTS -Dorg.elasticsearch.nativeaccess.enableVectorLibrary=false"
Comment 2 Matt Jolly gentoo-dev 2024-10-02 23:34:43 UTC
Upstream response is as follows:

>  Specifically, Elasticsearch does not support Gentoo linux, nor any systems that do not have systemd.
Comment 3 Matt Jolly gentoo-dev 2024-10-02 23:38:59 UTC
It is of note that in https://github.com/elastic/elasticsearch/commit/0f176e1779b2869f8cb2b788aae5509bbbcf3725 upstream dropped the requirement to use libsystemd - this may resolve itself in a later release. I have requested clarification on the upstream bug.
Comment 4 j4Hu 2024-10-03 07:07:00 UTC
"change you referenced is not yet released, it will be in 8.16. I suspect it will help you since we then only talk to systemd if the NOTIFY_SOCKET env var is present"


PS: tnx for help in upstream, this systemd=linux everywhere makes me very sad :(
why even for JAVA?! ....