gpt4 book ai didi

elasticsearch - 无法在centos 7服务器上启动Elasticsearch

转载 作者:行者123 更新时间:2023-12-02 23:06:42 32 4
gpt4 key购买 nike

安装后,启动服务时出现以下错误:

[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用户执行全新安装可以正常工作。

关于elasticsearch - 无法在centos 7服务器上启动Elasticsearch,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64681410/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com