From e9cd1682f9c1325d81a5f9ecd17375685d5145e9 Mon Sep 17 00:00:00 2001 From: Suyog Rao Date: Thu, 3 Mar 2016 21:48:34 -0800 Subject: [PATCH] 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 --- pkg/logstash.sysv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/logstash.sysv b/pkg/logstash.sysv index 25ec27f99..8b411d486 100755 --- a/pkg/logstash.sysv +++ b/pkg/logstash.sysv @@ -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}