cp -p /usr/share/appliance-config/modules/elasticsearch/templates/jvm.options.5.5.erb /usr/share/appliance-config/modules/elasticsearch/templates/jvm.options.5.5.erb.bkp cp -p /usr/share/appliance-config/modules/elasticsearch/templates/jvm.options.erb /usr/share/appliance-config/modules/elasticsearch/templates/jvm.options.erb.bkp
sudo vim /usr/share/appliance-config/modules/elasticsearch/templates/jvm.options.5.5.erb sudo vim /usr/share/appliance-config/modules/elasticsearch/templates/jvm.options.erb
# log4j 2 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -Dlog4j2.formatMsgNoLookups=true
sudo lastline_apply_config -o
rgrep Dlog4j2.formatMsgNoLookups /etc/elasticsearchExample output:
root@customer-pinbox:~# rgrep Dlog4j2.formatMsgNoLookups /etc/elasticsearch
/etc/elasticsearch/lldns/jvm.options:-Dlog4j2.formatMsgNoLookups=true
ps aux | grep -v grep | grep java.*log4j2.formatMsgNoLookups=trueExample output:
root@customer-pinbox:~# ps aux | grep -v grep | grep java.*log4j2.formatMsgNoLookups=true
elastic+ 3419 0.8 15.0 31104360 18642684 ? SLsl Dec10 3:00 /usr/bin/java -Xms16g -Xmx16g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djdk.io.permissionsUseCanonicalPath=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -Dlog4j2.formatMsgNoLookups=true -XX:+HeapDumpOnOutOfMemoryError -Des.path.home=/usr/share/elasticsearch -Des.path.conf=/etc/elasticsearch/lldns -Des.distribution.flavor=oss -Des.distribution.type=deb -cp /usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch -p /var/run/elasticsearch/elasticsearch.pid --quiet
None are expected due to the nature of log4j.