Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Not A Bug
-
8.6.2
-
None
-
None
Description
I want to be able to start solr with JFR and provide the JFR args through the CLI.
Those java parameters are of the form -XX:FlightRecorderOptions=stackdepth=128.
However when I provide those parameters, I get the following error message:
ERROR: -XX:FlightRecorderOptions=stackdepth=128 is not supported by this script
{{}}
This is due to the check in solr script:
if [ z "${1:}" ]; then
break # out-of-args, stop looping
elif [ "${1:0:2}" == "-D" ]; then
# pass thru any opts that begin with -D (java system props)
SOLR_OPTS+=("$1")
PASS_TO_RUN_EXAMPLE+=("$1")
shift
else
print_usage "$SCRIPT_CMD" "$1 is not supported by this script"
exit 1
fi
The line
elif [ "${1:0:2}" == "-D" ]; then
should be replaced by
elif [ "${1:0:2}" == "-D" -o "${1:0:3}" == "-XX" ]; then