voxpupuli / puppet-elasticsearch

Elasticsearch Puppet module
Apache License 2.0
404 stars 476 forks source link

export ES_HEAP_SIZE issue in init.d templates. #890

Open nikkonix opened 7 years ago

nikkonix commented 7 years ago

Hello

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:

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

tylerjl commented 7 years ago

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?

nikkonix commented 7 years ago

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

tylerjl commented 7 years ago

@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?