ElasticSearch or OpenSearch error:
fatal error in thread [main],
exiting
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
at org.opensearch.systemd.Libsystemd.lambda$static$0(Libsystemd.java:47) ~[?:?]
Solution:
mkdir -p /var/lib/opensearch/tmp
chmod 777 /var/lib/opensearch/tmp
edit file: /etc/opensearch/jvm.options
-Djava.io.tmpdir=${OPENSEARCH_TMPDIR}
to
-Djava.io.tmpdir=/var/lib/opensearch/tmp