sous-chefs / elasticsearch

Development repository for the elasticsearch cookbook
https://supermarket.chef.io/cookbooks/elasticsearch
Other
881 stars 599 forks source link

deprecated options jvm.options file #750

Closed randyrue closed 1 year ago

randyrue commented 4 years ago

Hello,

Upgraded ES to 7.9.2 and it won't start because the cookbook is setting three parameters in /etc/elasticsearch/jvm.options that are no longer allowed: -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly

I've searched my wrapper cookbook and your cookbook recursively for where these default options are specified with no luck.

Where are these defined?

Randy in Seattle

devkmsg commented 4 years ago

These are set in the elasticsearch_configure resource, you can remove them by passing your own jvm_options like the example in the README

https://github.com/elastic/cookbook-elasticsearch/blob/5f1f3a32fcec256d7ffbd262220800139f11ee93/libraries/resource_configure.rb#L49-L51

damacus commented 1 year ago

I've fixed this in #767 with following JVM options as a default:

As per the docs , options starting with 8 only apply to JVM 8.

    8-13:-XX:+UseConcMarkSweepGC
    8-13:-XX:CMSInitiatingOccupancyFraction=75
    8-13:-XX:+UseCMSInitiatingOccupancyOnly
    14-:-XX:+UseG1GC
    -Djava.io.tmpdir=${ES_TMPDIR}
    -XX:+HeapDumpOnOutOfMemoryError
    9-:-XX:+ExitOnOutOfMemoryError
    -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log
    8:-XX:+PrintGCDetails
    8:-XX:+PrintGCDateStamps
    8:-XX:+PrintTenuringDistribution
    8:-XX:+PrintGCApplicationStoppedTime
    8:-Xloggc:/var/log/elasticsearch/gc.log
    8:-XX:+UseGCLogFileRotation
    8:-XX:NumberOfGCLogFiles=32
    8:-XX:GCLogFileSize=64m
    9-:-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64mruby
damacus commented 1 year ago

Closed via #767