I am using elasticsearch in a liferay portal (sidecar). Unfortunately, elasticsearch can only be startet as root user. Otherwise, I get a java native error in
org.elasticsearch.bootstrap.JNANatives.trySetMaxNumberOfThreads
on bootstrapping:
V [libjvm.so+0x687142] InterpreterRuntime::resolve_invoke(JavaThread*, Bytecodes::Code)+0x1b2
j org.elasticsearch.bootstrap.JNANatives.trySetMaxNumberOfThreads()V+20
j org.elasticsearch.bootstrap.Natives.trySetMaxNumberOfThreads()V+17
j org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Ljava/nio/file/Path;ZZZ)V+75
I have checked/updated the ulimits for the current user, but it seems like JNANatives
is not allowed to execute this methods. The service starts fine as root, but I want to avoid any root processes on the server. Does someone had a similar problem? How can I debug this? What could be the issue here?
Many thanks