Çözüm Could not initialize class com.sun.jna.Native

Bu konu bir çözümü açıklamaktadır. Herhangi bir çözüm açıklanmadığını düşünüyorsanız konuyu rapor edebilirsiniz.
Katılım
14 Ağustos 2010
Mesajlar
79.058
Makaleler
289
Çözümler
2.268
Yer
İstanbul
Daha fazla  
Cinsiyet
Erkek
Profil Kapağı
1522743131
CentOS 7.8 sunucuya Elasticsearch 7.9 kurdunuz fakat servis başlamıyor.

Sorun: /tmp klasörünün sistemde noexec olarak yerleştirlmiş olması.

Çözüm: ES_TMPDIR klasörünü başka bir konuma verin, her şey çalışmaya başlayacak.

Gereken komutlar:

Yeni bir tmp dizini oluşturun:

mkdir /var/lib/elasticsearch/tmp

Ardından doğru sahiplik ve izinleri atayın:

chown elasticsearch:elasticsearch /var/lib/elasticsearch/tmp
chmod 775 /var/lib/elasticsearch/tmp

Son olarak, ES_TMPDIR ve TMPDIR satırını /etc/sysconfig/elasticsearch'e ekleyin:

echo "ES_TMPDIR=/var/lib/elasticsearch/tmp" >> /etc/sysconfig/elasticsearch
echo "TMPDIR=/var/lib/elasticsearch/tmp" >> /etc/sysconfig/elasticsearch

Artık ES sunucusunu çalıştırabilirsiniz:

systemctl start elasticsearch

Kod:
[2020-08-30T08:23:41,395][WARN ][o.e.b.Natives            ] [server.technopat.net] unable to load JNA native support library, native methods will be disabled.
java.lang.UnsatisfiedLinkError: /tmp/elasticsearch-11321975724510634029/jna4301737808016431714.tmp: /tmp/elasticsearch-11321975724510634029/jna4301737808016431714.tmp: failed to map segment from shared object: Operation not permitted
    at java.lang.ClassLoader$NativeLibrary.load0(Native Method) ~[?:?]
    at java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2452) ~[?:?]
    at java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2508) ~[?:?]
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2704) ~[?:?]
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2637) ~[?:?]
    at java.lang.Runtime.load0(Runtime.java:745) ~[?:?]
    at java.lang.System.load(System.java:1871) ~[?:?]
    at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1018) ~[jna-5.5.0.jar:5.5.0 (b0)]
    at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:988) ~[jna-5.5.0.jar:5.5.0 (b0)]
    at com.sun.jna.Native.<clinit>(Native.java:195) ~[jna-5.5.0.jar:5.5.0 (b0)]
    at java.lang.Class.forName0(Native Method) ~[?:?]
    at java.lang.Class.forName(Class.java:340) ~[?:?]
    at org.elasticsearch.bootstrap.Natives.<clinit>(Natives.java:45) [elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:110) [elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178) [elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) [elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) [elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) [elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) [elasticsearch-cli-7.9.0.jar:7.9.0]
    at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) [elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-7.9.0.jar:7.9.0]
[2020-08-30T08:23:41,399][WARN ][o.e.b.Natives            ] [server.technopat.net] cannot check if running as root because JNA is not available
[2020-08-30T08:23:41,399][WARN ][o.e.b.Natives            ] [server.technopat.net] cannot install system call filter because JNA is not available
[2020-08-30T08:23:41,400][WARN ][o.e.b.Natives            ] [server.technopat.net] cannot register console handler because JNA is not available
[2020-08-30T08:23:41,400][WARN ][o.e.b.Natives            ] [server.technopat.net] cannot getrlimit RLIMIT_NPROC because JNA is not available
[2020-08-30T08:23:41,400][WARN ][o.e.b.Natives            ] [server.technopat.net] cannot getrlimit RLIMIT_AS because JNA is not available
[2020-08-30T08:23:41,400][WARN ][o.e.b.Natives            ] [server.technopat.net] cannot getrlimit RLIMIT_FSIZE because JNA is not available
[2020-08-30T08:23:41,468][INFO ][o.e.n.Node               ] [server.technopat.net] version[7.9.0], pid[21879], build[default/rpm/a479a2a7fce0389512d6a9361301708b92dff667/2020-08-11T21:36:48.204330Z], OS[Linux/3.10.0-1127.19.1.el7.x86_64/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/14.0.1/14.0.1+7]
[2020-08-30T08:23:41,468][INFO ][o.e.n.Node               ] [server.technopat.net] JVM home [/usr/share/elasticsearch/jdk]
[2020-08-30T08:23:41,469][INFO ][o.e.n.Node               ] [server.technopat.net] JVM arguments [-Xshare:auto, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -XX:+ShowCodeDetailsInExceptionMessages, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=SPI,COMPAT, -Xms1g, -Xmx1g, -XX:+UseG1GC, -XX:G1ReservePercent=25, -XX:InitiatingHeapOccupancyPercent=30, -Djava.io.tmpdir=/tmp/elasticsearch-11321975724510634029, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -XX:MaxDirectMemorySize=536870912, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch, -Des.distribution.flavor=default, -Des.distribution.type=rpm, -Des.bundled_jdk=true]
[2020-08-30T08:23:42,728][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [aggs-matrix-stats]
[2020-08-30T08:23:42,728][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [analysis-common]
[2020-08-30T08:23:42,728][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [constant-keyword]
[2020-08-30T08:23:42,729][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [flattened]
[2020-08-30T08:23:42,729][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [frozen-indices]
[2020-08-30T08:23:42,729][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [ingest-common]
[2020-08-30T08:23:42,729][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [ingest-geoip]
[2020-08-30T08:23:42,729][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [ingest-user-agent]
[2020-08-30T08:23:42,729][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [kibana]
[2020-08-30T08:23:42,729][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [lang-expression]
[2020-08-30T08:23:42,729][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [lang-mustache]
[2020-08-30T08:23:42,729][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [lang-painless]
[2020-08-30T08:23:42,729][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [mapper-extras]
[2020-08-30T08:23:42,729][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [parent-join]
[2020-08-30T08:23:42,730][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [percolator]
[2020-08-30T08:23:42,730][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [rank-eval]
[2020-08-30T08:23:42,730][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [reindex]
[2020-08-30T08:23:42,730][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [repository-url]
[2020-08-30T08:23:42,730][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [search-business-rules]
[2020-08-30T08:23:42,730][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [searchable-snapshots]
[2020-08-30T08:23:42,730][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [spatial]
[2020-08-30T08:23:42,731][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [systemd]
[2020-08-30T08:23:42,731][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [tasks]
[2020-08-30T08:23:42,731][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [transform]
[2020-08-30T08:23:42,731][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [transport-netty4]
[2020-08-30T08:23:42,731][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [vectors]
[2020-08-30T08:23:42,731][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [wildcard]
[2020-08-30T08:23:42,731][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-analytics]
[2020-08-30T08:23:42,731][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-async]
[2020-08-30T08:23:42,731][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-async-search]
[2020-08-30T08:23:42,731][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-autoscaling]
[2020-08-30T08:23:42,731][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-ccr]
[2020-08-30T08:23:42,732][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-core]
[2020-08-30T08:23:42,732][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-data-streams]
[2020-08-30T08:23:42,732][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-deprecation]
[2020-08-30T08:23:42,732][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-enrich]
[2020-08-30T08:23:42,732][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-eql]
[2020-08-30T08:23:42,732][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-graph]
[2020-08-30T08:23:42,732][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-identity-provider]
[2020-08-30T08:23:42,732][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-ilm]
[2020-08-30T08:23:42,732][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-logstash]
[2020-08-30T08:23:42,732][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-ml]
[2020-08-30T08:23:42,732][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-monitoring]
[2020-08-30T08:23:42,732][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-ql]
[2020-08-30T08:23:42,733][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-rollup]
[2020-08-30T08:23:42,733][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-security]
[2020-08-30T08:23:42,733][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-sql]
[2020-08-30T08:23:42,733][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-stack]
[2020-08-30T08:23:42,733][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-voting-only-node]
[2020-08-30T08:23:42,733][INFO ][o.e.p.PluginsService     ] [server.technopat.net] loaded module [x-pack-watcher]
[2020-08-30T08:23:42,733][INFO ][o.e.p.PluginsService     ] [server.technopat.net] no plugins loaded
[2020-08-30T08:23:42,753][INFO ][o.e.e.NodeEnvironment    ] [server.technopat.net] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [684.8gb], net total_space [930gb], types [rootfs]
[2020-08-30T08:23:42,753][INFO ][o.e.e.NodeEnvironment    ] [server.technopat.net] heap size [1gb], compressed ordinary object pointers [true]
[2020-08-30T08:23:42,797][INFO ][o.e.n.Node               ] [server.technopat.net] node name [server.technopat.net], node ID [Bq_apUSpSfGSakl-wn1Yrg], cluster name [elasticsearch]
[2020-08-30T08:23:44,786][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [server.technopat.net] [controller/22114] [Main.cc@114] controller (64 bit): Version 7.9.0 (Build 2639177a4c3ad6) Copyright (c) 2020 Elasticsearch BV
[2020-08-30T08:23:45,163][INFO ][o.e.x.s.a.s.FileRolesStore] [server.technopat.net] parsed [0] roles from file [/etc/elasticsearch/roles.yml]
[2020-08-30T08:23:45,806][INFO ][o.e.d.DiscoveryModule    ] [server.technopat.net] using discovery type [zen] and seed hosts providers [settings]
[2020-08-30T08:23:46,039][WARN ][o.e.g.DanglingIndicesState] [server.technopat.net] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually
[2020-08-30T08:23:46,250][INFO ][o.e.n.Node               ] [server.technopat.net] initialized
[2020-08-30T08:23:46,251][INFO ][o.e.n.Node               ] [server.technopat.net] starting ...
[2020-08-30T08:23:46,328][INFO ][o.e.t.TransportService   ] [server.technopat.net] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}
[2020-08-30T08:23:46,418][WARN ][o.e.b.BootstrapChecks    ] [server.technopat.net] system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
[2020-08-30T08:23:46,418][WARN ][o.e.b.BootstrapChecks    ] [server.technopat.net] the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
[2020-08-30T08:23:46,418][INFO ][o.e.c.c.Coordinator      ] [server.technopat.net] cluster UUID [6h8TLXmyQuSk_3ovhuu10A]
[2020-08-30T08:23:46,423][INFO ][o.e.c.c.ClusterBootstrapService] [server.technopat.net] no discovery configuration found, will perform best-effort cluster bootstrapping after [3s] unless existing master is discovered
[2020-08-30T08:23:46,517][INFO ][o.e.c.s.MasterService    ] [server.technopat.net] elected-as-master ([1] nodes joined)[{server.technopat.net}{Bq_apUSpSfGSakl-wn1Yrg}{9hewuuZPRZ6p3fbyEGhEYg}{127.0.0.1}{127.0.0.1:9300}{dilmrt}{ml.machine_memory=67170979840, xpack.installed=true, transform.node=true, ml.max_open_jobs=20} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 6, version: 6, delta: master node changed {previous [], current [{server.technopat.net}{Bq_apUSpSfGSakl-wn1Yrg}{9hewuuZPRZ6p3fbyEGhEYg}{127.0.0.1}{127.0.0.1:9300}{dilmrt}{ml.machine_memory=67170979840, xpack.installed=true, transform.node=true, ml.max_open_jobs=20}]}
[2020-08-30T08:23:46,540][INFO ][o.e.c.s.ClusterApplierService] [server.technopat.net] master node changed {previous [], current [{server.technopat.net}{Bq_apUSpSfGSakl-wn1Yrg}{9hewuuZPRZ6p3fbyEGhEYg}{127.0.0.1}{127.0.0.1:9300}{dilmrt}{ml.machine_memory=67170979840, xpack.installed=true, transform.node=true, ml.max_open_jobs=20}]}, term: 6, version: 6, reason: Publication{term=6, version=6}
[2020-08-30T08:23:46,560][INFO ][o.e.h.AbstractHttpServerTransport] [server.technopat.net] publish_address {127.0.0.1:9200}, bound_addresses {[::1]:9200}, {127.0.0.1:9200}
[2020-08-30T08:23:46,560][INFO ][o.e.n.Node               ] [server.technopat.net] started
[2020-08-30T08:23:46,561][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [server.technopat.net] fatal error in thread [main], exiting
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
    at org.elasticsearch.systemd.Libsystemd.lambda$static$0(Libsystemd.java:34) ~[?:?]
    at java.security.AccessController.doPrivileged(AccessController.java:312) ~[?:?]
    at org.elasticsearch.systemd.Libsystemd.<clinit>(Libsystemd.java:33) ~[?:?]
    at org.elasticsearch.systemd.SystemdPlugin.sd_notify(SystemdPlugin.java:126) ~[?:?]
    at org.elasticsearch.systemd.SystemdPlugin.onNodeStarted(SystemdPlugin.java:137) ~[?:?]
    at java.util.ArrayList.forEach(ArrayList.java:1510) ~[?:?]
    at org.elasticsearch.node.Node.start(Node.java:868) ~[elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:317) ~[elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:402) ~[elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) ~[elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) ~[elasticsearch-cli-7.9.0.jar:7.9.0]
    at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) ~[elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.9.0.jar:7.9.0]
 

Yeni konular

Geri
Yukarı