安装后,启动服务时出现以下错误:
[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
应用了以下修复程序:
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
ll /var/lib/elasticsearch
total 8
drwxr-sr-x. 3 elasticsearch elasticsearch 4096 Nov 4 07:20 nodes
drwxr-sr-x. 2 elasticsearch elasticsearch 4096 Nov 4 08:10 tmp
然后在Elasticsearch Service启动时出现以下错误:
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: # http://bugreport.java.com/bugreport/crash.jsp
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
环境详细信息:
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
elasticsearch.yml:
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
discovery.seed_hosts: ["IP ADDRESS HERE"]
cluster.initial_master_nodes: ["${HOSTNAME}"]
bootstrap.system_call_filter: false
任何想法?
看起来像错误消息中所示的权限问题,与普通用户(而不是elastic
用户)进行全新安装可以正常工作。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句