Unable to start elasticsearch on centos 7 server

After installation, we got following error when started the service:

[2020-11-04T07:20:12,233][WARN ][o.e.b.Natives ] [test] unable to load JNA native support library, native methods will be disabled.
java.lang.UnsatisfiedLinkError: /tmp/elasticsearch-16982199008150233397/jna17827281711253842809.tmp: /tmp/elasticsearch-16982199008150233397/jna17827281711253842809.tmp: failed to map segment from shared object: Operation not permitted

Applied the following fix:
vim /etc/sysconfig/elasticsearch
ES_TMPDIR=/var/lib/elasticsearch/tmp

vim /etc/elasticsearch/jvm.options

JVM temporary directory

-Djava.io.tmpdir=${ES_TMPDIR}
-Djna.tmpdir=/var/lib/elasticsearch/tmp

Then got the following error on elasticsearch service start:

Nov 4 08:10:17 test systemd: Starting Elasticsearch...
Nov 4 08:10:17 test systemd-entrypoint: future versions of Elasticsearch will require Java 11; your Java version from [/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-0.el7_8.x86_64/jre] does not meet this requirement
Nov 4 08:10:17 test systemd-entrypoint: future versions of Elasticsearch will require Java 11; your Java version from [/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-0.el7_8.x86_64/jre] does not meet this requirement
Nov 4 08:10:19 test systemd-entrypoint: #
Nov 4 08:10:19 test systemd-entrypoint: # A fatal error has been detected by the Java Runtime Environment:
Nov 4 08:10:19 test systemd-entrypoint: #
Nov 4 08:10:19 test systemd-entrypoint: # SIGSEGV (0xb) at pc=0x00007f6768e34c95, pid=194820, tid=0x00007f67d144b700
Nov 4 08:10:19 test systemd-entrypoint: #
Nov 4 08:10:19 test systemd-entrypoint: # JRE version: OpenJDK Runtime Environment (8.0_262-b10) (build 1.8.0_262-b10)
Nov 4 08:10:19 test systemd-entrypoint: # Java VM: OpenJDK 64-Bit Server VM (25.262-b10 mixed mode, sharing linux-amd64 compressed oops)
Nov 4 08:10:19 test systemd-entrypoint: # Problematic frame:
Nov 4 08:10:19 test systemd-entrypoint: # C [jna3377815825213492039.tmp+0x12c95] ffi_prep_closure_loc+0x15
Nov 4 08:10:19 test systemd-entrypoint: #
Nov 4 08:10:19 test systemd-entrypoint: # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
Nov 4 08:10:19 test systemd-entrypoint: #
Nov 4 08:10:19 test systemd-entrypoint: # An error report file with more information is saved as:
Nov 4 08:10:19 test systemd-entrypoint: # /var/log/elasticsearch/hs_err_pid194820.log
Nov 4 08:10:19 test systemd-entrypoint: #
Nov 4 08:10:19 test systemd-entrypoint: # If you would like to submit a bug report, please visit:
Nov 4 08:10:19 test systemd-entrypoint: # Crash Report
Nov 4 08:10:19 test systemd-entrypoint: # The crash happened outside the Java Virtual Machine in native code.
Nov 4 08:10:19 test systemd-entrypoint: # See problematic frame for where to report the bug.
Nov 4 08:10:19 test systemd-entrypoint: #
Nov 4 08:10:19 test systemd-entrypoint: 2020-11-04 13:10:19,805768 UTC [195028] ERROR CLogger.cc@310 Cannot log to named pipe /var/lib/elasticsearch/tmp/controller_log_194820 as it could not be opened for writing
Nov 4 08:10:19 test systemd-entrypoint: 2020-11-04 13:10:19,805841 UTC [195028] INFO Main.cc@103 Parent process died - ML controller exiting

Environment Details:
echo $JAVA_HOME
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-0.el7_8.x86_64

CentOS Linux release 7.7.1908 (Core)
elasticsearch-7.9.0-1.x86_64

Any idea?

What do your actual Elasticsearch logs show?

Elasticsearch logs are empty. The service start fails and the system log shows the error that I added in description.

It specifically mentions /var/log/elasticsearch/hs_err_pid194820.log, does that not exist?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.