Elasticsearch does not work out of the box with older Java versions
muelli opened this issue · 1 comments
muelli commented
When attempting to run Elasticsearch from the ELK example, I get the following error:
[2015-06-17 08:50:43,297][ERROR][bootstrap ] {1.4.5}: Initializa
tion Failed ...
- RuntimeException[Java version: 1.7.0_51 suffers from critical bug https://bug
s.openjdk.java.net/browse/JDK-8024830 which can cause data corruption.
Please upgrade the JVM, see http://www.elastic.co/guide/en/elasticsearch/refere
nce/current/_installation.html for current recommendations.
If you absolutely cannot upgrade, please add -XX:-UseSuperWord to the JVM_OPTS
environment variable.
Upgrading is preferred, this workaround will result in degraded performance.]
This seems to be here: elastic/elasticsearch#10611
I have expected to be able to run Elasticsearch after running the role.
Putting
tasks:
- name: Configuring elasticsearch to work with OpenJDK 7
lineinfile:
state: present
dest: /etc/default/elasticsearch
line: ES_JAVA_OPTS=-XX:-UseSuperWord
in the playbook helps me.
I guess a solution is to either require a more modern Java version (which is complicated on contemporary stable systems like Ubuntu or Debian) or to configure Elasticsearch the way I've shown.
geerlingguy commented
@muelli - Thanks! Added a note in the README with instructions for getting Java 8 on most OSes.