elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.67k stars 24.66k forks source link

Any -XLog option (from env of options file) is removed in windows service wrapper script #83270

Open gillg opened 2 years ago

gillg commented 2 years ago

Elasticsearch Version

<= 8

Installed Plugins

No response

Java Version

bundled

OS Version

Windows

Problem Description

Any -XLog option (probably containing a coma or wildcard) like the native one -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m is systematicaly removed from OTHER_JAVA_OPTS here https://github.com/elastic/elasticsearch/blob/master/distribution/src/bin/elasticsearch-service.bat#L178

The value inside ES_JAVA_OPTS just before the loop is correct ! The bug is in the batch loop implementation.

Steps to Reproduce

Just install the service on windows with ./elasticsearch-service.bat install ElasticSearch Then open the Procrun manager elasticsearch-service.bat manager elasticsearch

See in Java tab, XLog arguments are absent !

Logs (if relevant)

No response

elasticmachine commented 2 years ago

Pinging @elastic/es-core-infra (Team:Core/Infra)