centos 7上安装elasticsearch rpm时出现问题

68de4m5k  于 2021-06-10  发布在  ElasticSearch
关注(0)|答案(0)|浏览(273)
Nov 05 03:19:36 TEST systemd-entrypoint[129737]: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
    Nov 05 03:19:36 TEST systemd-entrypoint[129737]: at org.elasticsearch.systemd.Libsystemd.lambda$static$0(Libsystemd.java:34)
    Nov 05 03:19:36 TEST systemd-entrypoint[129737]: at java.security.AccessController.doPrivileged(Native Method)
    Nov 05 03:19:36 TEST systemd-entrypoint[129737]: at org.elasticsearch.systemd.Libsystemd.<clinit>(Libsystemd.java:33)
    Nov 05 03:19:36 TEST systemd-entrypoint[129737]: at org.elasticsearch.systemd.SystemdPlugin.sd_notify(SystemdPlugin.java:126)
    Nov 05 03:19:36 TEST systemd-entrypoint[129737]: at org.elasticsearch.systemd.SystemdPlugin.onNodeStarted(SystemdPlugin.java:137)
    Nov 05 03:19:36 TEST systemd-entrypoint[129737]: at java.util.ArrayList.forEach(ArrayList.java:1259)
    Nov 05 03:19:36 TEST systemd-entrypoint[129737]: at org.elasticsearch.node.Node.start(Node.java:868)
    Nov 05 03:19:36 TEST systemd-entrypoint[129737]: at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:317)
    Nov 05 03:19:36 TEST systemd-entrypoint[129737]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:402)
    Nov 05 03:19:36 TEST systemd-entrypoint[129737]: at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
    Nov 05 03:19:36 TEST systemd-entrypoint[129737]: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
    Nov 05 03:19:36 TEST systemd-entrypoint[129737]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.j
    Nov 05 03:19:36 TEST systemd-entrypoint[129737]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)
    Nov 05 03:19:36 TEST systemd-entrypoint[129737]: at org.elasticsearch.cli.Command.main(Command.java:90)
    Nov 05 03:19:36 TEST systemd-entrypoint[129737]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
    Nov 05 03:19:36 TEST systemd-entrypoint[129737]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)

当我使用rpm安装ElasticSearch时会出现这个错误。具体步骤如下:

rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.9.0-x86_64.rpm
rpm -ivh elasticsearch-7.9.0-x86_64.rpm

vi /etc/sysconfig/elasticsearch
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-0.el7_8.x86_64

sudo systemctl daemon-reload
sudo systemctl start elasticsearch.service

然后得到上面的错误。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题