New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Centos 7 and - java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native #57018
Comments
It'd probably be useful to see your distro version like from |
Pinging @elastic/es-core-infra (:Core/Infra/Packaging) |
The log file provided appears to only be the tail. Can you please provide the rest of the file? JNA failed to load, and it should have an error above the log file snippet here. Separately, we currently lack graceful degredation for the systemd notifier hook when jna is not available. Need to think about what to do in this case, since we can't dynamically change systemd's reliance on this configuration option we have within our service file. |
Check your tmp directory. Can be set in jvm.options file |
This is a head (it does not seem fixing ES_TMPDIR helps)
|
We have not experienced this in our own testing. These are kinds of failures to initialize JNA are usually environmental issues, for example having /tmp mounted noexec. See the documentation for what seems like this exact issue: https://www.elastic.co/guide/en/elasticsearch/reference/master/executable-jna-tmpdir.html. As this is not a bug, I hope you don't mind I close this issue. |
Hi Sorry to bring this issue up again; I got the same error on a centos machine and then installed openJDK which then gave me the error below. Can anyone please give me some clues on how to resolve the error? I followed that link about
|
after try every thing from every where you are right |
Yep, that seemed to fix our problem as well.
Thanks for the help! |
Fixed my issue too! Thanks. |
Cpanel / CENTOS 7.9 kvm [ip-160-153-250-187] v90.0.16 Worked for me too thank you so much! |
Ran into this issue, more hosts are providing servers with /tmp as noexec. Updating to exec or changing tmpdir fixed it. |
I would like to add that @ddrager's comment is the correct one, it is caused by /tmp being mounted noexec. |
This seem to solve it for me too thanks so much |
Solved my problems.. Tks. |
Elasticsearch version (
bin/elasticsearch --version
):Plugins installed: []
JVM version (
java -version
):openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
OS version (
uname -a
if on a Unix-like system):Description of the problem including expected versus actual behavior:
Steps to reproduce:
A fresh installation and first systemd start.
Provide logs (if relevant):
The text was updated successfully, but these errors were encountered: