Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions distribution/src/bin/elasticsearch-env
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,17 @@ else
JAVA_TYPE="bundled JDK"
fi

# do not let JAVA_TOOL_OPTIONS slip in (as the JVM does by default)
# do not let JAVA_TOOL_OPTIONS OR _JAVA_OPTIONS slip in (as the JVM does by default)
if [ ! -z "$JAVA_TOOL_OPTIONS" ]; then
echo "warning: ignoring JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS"
echo -n "warning: ignoring JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS; "
echo "pass JVM parameters via ES_JAVA_OPTS"
unset JAVA_TOOL_OPTIONS
fi
if [ ! -z "$_JAVA_OPTIONS" ]; then
echo -n "warning: ignoring _JAVA_OPTIONS=$_JAVA_OPTIONS; "
echo "pass JVM parameters via ES_JAVA_OPTS"
unset _JAVA_OPTIONS
fi

# warn that we are not observing the value of JAVA_HOME
if [ ! -z "$JAVA_HOME" ]; then
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog/124843.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 124843
summary: Ignore _JAVA_OPTIONS
area: Infra/CLI
type: enhancement
issues: []