Fix configtest option in init scripts

No need to export all the JAVA* related environment variables
for configtest. It needs a minimal set of variables to execute
bin/logstash --config-test. This was indirectly causing issues
when used with JMX options in LS_JAVA_OPTS. JMX needs a remote port defined
and configtest was trying to connect to the port twice which caused
restart (#4319) to fail

Fixes #4319

Fixes #4759
This commit is contained in:
Suyog Rao 2016-03-03 21:48:34 -08:00
parent fdb959e6ae
commit e9cd1682f9

View file

@ -142,7 +142,7 @@ configtest() {
fi
HOME=${LS_HOME}
export PATH HOME JAVA_OPTS LS_HEAP_SIZE LS_JAVA_OPTS LS_USE_GC_LOGGING
export PATH HOME
test_args="--configtest -f ${LS_CONF_DIR} ${LS_OPTS}"
$program ${test_args}