Elasticsearch can't start service

I can't start and restart systemctl elasticsearch after reboot server, I want to know what is the reason please.

this is log!

[2022-12-09T00:59:50,406][WARN ][o.e.b.Natives            ] [vmcbmsudbu01] unable to load JNA native support library, native methods will be disabled.
java.lang.UnsatisfiedLinkError: /tmp/elasticsearch-5476689323702841837/jna2095382244162934335.tmp: /tmp/elasticsearch-5476689323702841837/jna2095382244162934335.tmp: failed to map segment from shared object: Operation not permitted
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116) [elasticsearch-cli-7.12.1.jar:7.12.1]
[2022-12-09T00:59:50,443][WARN ][o.e.b.Natives            ] [vmcbmsudbu01] cannot check if running as root because JNA is not available
[2022-12-09T00:59:50,444][WARN ][o.e.b.Natives            ] [vmcbmsudbu01] cannot register console handler because JNA is not available
[2022-12-09T00:59:50,446][WARN ][o.e.b.Natives            ] [vmcbmsudbu01] cannot getrlimit RLIMIT_NPROC because JNA is not available
[2022-12-09T00:59:50,447][WARN ][o.e.b.Natives            ] [vmcbmsudbu01] cannot getrlimit RLIMIT_AS because JNA is not available
[2022-12-09T00:59:50,447][WARN ][o.e.b.Natives            ] [vmcbmsudbu01] cannot getrlimit RLIMIT_FSIZE because JNA is not available
[2022-12-09T00:59:51,253][INFO ][o.e.n.Node               ] [vmcbmsudbu01] 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, --add-opens=java.base/java.io=ALL-UNNAMED, -Xms4g, -Xmx4g, -XX:+UseG1GC, -Djava.io.tmpdir=/tmp/elasticsearch-5476689323702841837, -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=2147483648, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch, -Des.distribution.flavor=default, -Des.distribution.type=rpm, -Des.bundled_jdk=true]
[2022-12-09T01:00:19,374][WARN ][o.e.b.BootstrapChecks    ] [vmcbmsudbu01] 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
[2022-12-09T01:00:19,978][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [vmcbmsudbu01] fatal error in thread [main], exiting
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116) ~[elasticsearch-cli-7.12.1.jar:7.12.1]
[2022-12-09T01:06:30,324][WARN ][o.e.b.Natives            ] [vmcbmsudbu01] unable to load JNA native support library, native methods will be disabled.
java.lang.UnsatisfiedLinkError: /tmp/elasticsearch-9185604281601812838/jna12204163871728601283.tmp: /tmp/elasticsearch-9185604281601812838/jna12204163871728601283.tmp: failed to map segment from shared object: Operation not permitted
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116) [elasticsearch-cli-7.12.1.jar:7.12.1]
[2022-12-09T01:06:30,337][WARN ][o.e.b.Natives            ] [vmcbmsudbu01] cannot check if running as root because JNA is not available
[2022-12-09T01:06:30,338][WARN ][o.e.b.Natives            ] [vmcbmsudbu01] cannot register console handler because JNA is not available
[2022-12-09T01:06:30,340][WARN ][o.e.b.Natives            ] [vmcbmsudbu01] cannot getrlimit RLIMIT_NPROC because JNA is not available
[2022-12-09T01:06:30,340][WARN ][o.e.b.Natives            ] [vmcbmsudbu01] cannot getrlimit RLIMIT_AS because JNA is not available
[2022-12-09T01:06:30,340][WARN ][o.e.b.Natives            ] [vmcbmsudbu01] cannot getrlimit RLIMIT_FSIZE because JNA is not available
[2022-12-09T01:06:30,946][INFO ][o.e.n.Node               ] [vmcbmsudbu01] 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, --add-opens=java.base/java.io=ALL-UNNAMED, -Xms4g, -Xmx4g, -XX:+UseG1GC, -Djava.io.tmpdir=/tmp/elasticsearch-9185604281601812838, -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=2147483648, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch, -Des.distribution.flavor=default, -Des.distribution.type=rpm, -Des.bundled_jdk=true]
[2022-12-09T01:06:58,365][WARN ][o.e.b.BootstrapChecks    ] [vmcbmsudbu01] 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
[2022-12-09T01:06:58,835][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [vmcbmsudbu01] fatal error in thread [main], exiting
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116) ~[elasticsearch-cli-7.12.1.jar:7.12.1]

Someone help me, please!

Hello,

Please share the entire log from the beginning. Are you using the bundled JVM or are you using a another JVM?

Also, there is no SLA in this forum, bumping the post will not help.

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