puppet-elasticsearch
puppet-elasticsearch copied to clipboard
export ES_HEAP_SIZE issue in init.d templates.
Hello
- Module version: 5.4.3
- Puppet version: 3.8.7
- OS and version:Ubuntu 14.04.3 LTS
- Elasticsearch version: 5.6.3
- Java version - Oracle Java 8
Bug description
In elasticsearch puppet module in init.d scripts templated you have the following variable exported: export ES_HEAP_SIZE
When you have Java 8 and trying to install Elasticsearch 5.X this cause the init scrip to fail:
- Starting Elasticsearch Server RewardGateway Error: encountered environment variables that are no longer supported Use jvm.options or ES_JAVA_OPTS to configure the JVM ES_HEAP_SIZE=256M: set -Xms256M and -Xmx256M in jvm.options or add "-Xms256M -Xmx256M" to ES_JAVA_OPTS
It really does not matter if you set value and export it or do the other suggestions. Script starts elasticsearch only fi you remove export ES_HEAP_SIZE from init.d script. If ppl want to specify heap size they have to user jvm_options and -Xms256M , -Xmx256M.
Please reproduce it , but ES_HEAP_SIZE should disappear(be optional) from init.d template scripts.
P.S. I saw that other ppl face this issue, but I think templates should be fixed, thats why I'm opening and issue.
Thank you in advance
Regards Atanas
Hi @nikkonix,
At the moment, this module still supports version 2.x of Elasticsearch, which sets the heap size based upon the ES_HEAP_SIZE
environment variable. Although the init script does export this environment variable, the module is compatible with Java 8 and Elasticsearch 5.x as long as you do not set ES_HEAP_SIZE
anywhere. I would suggest perhaps ensuring that ES_HEAP_SIZE
is absent from your init defaults file, wherever that might be (for example, in /etc/default/elasticsearch-es-01
).
Does that help at all?
Hello, I dont have it anywhere else , only the present in the init script trying to start it, is provoking it. Removing the export in init script is solving the issue. Thats why I suggested to make it optional. Regards Atanas
@nikkonix I'm trying to come up with a reproducible test case for what you're describing and can't seem to be able to do so. Do you have an example puppet manifest perhaps that recreates the situation you're describing?