diff --git a/bin/bookkeeper b/bin/bookkeeper index 0cc07dd49aba5..445ddb22f9366 100755 --- a/bin/bookkeeper +++ b/bin/bookkeeper @@ -183,7 +183,7 @@ fi OPTS="-cp $BOOKIE_CLASSPATH $OPTS" # Disable ipv6 as it can cause issues -OPTS="$OPTS -Djava.net.preferIPv4Stack=true" +OPTS="-Djava.net.preferIPv4Stack=true $OPTS" OPTS="$OPTS $BOOKIE_MEM $BOOKIE_GC $BOOKIE_GC_LOG $BOOKIE_EXTRA_OPTS" diff --git a/bin/function-localrunner b/bin/function-localrunner index 2e0aa0f6dffe2..39ce218ceaac2 100755 --- a/bin/function-localrunner +++ b/bin/function-localrunner @@ -103,7 +103,7 @@ fi # Ensure we can read bigger content from ZK. (It might be # rarely needed when trying to list many z-nodes under a # directory) -OPTS="$OPTS -Djute.maxbuffer=10485760 -Djava.net.preferIPv4Stack=true" +OPTS="-Djava.net.preferIPv4Stack=true $OPTS -Djute.maxbuffer=10485760" OPTS="-cp $PULSAR_CLASSPATH $OPTS" diff --git a/bin/pulsar b/bin/pulsar index 1165681237ae3..f201829cf7259 100755 --- a/bin/pulsar +++ b/bin/pulsar @@ -285,7 +285,7 @@ OPTS="$OPTS -Dlog4j.configurationFile=`basename $PULSAR_LOG_CONF`" # Ensure we can read bigger content from ZK. (It might be # rarely needed when trying to list many z-nodes under a # directory) -OPTS="$OPTS -Djute.maxbuffer=10485760 -Djava.net.preferIPv4Stack=true" +OPTS="-Djava.net.preferIPv4Stack=true $OPTS -Djute.maxbuffer=10485760" # Enable TCP keepalive for all Zookeeper client connections OPTS="$OPTS -Dzookeeper.clientTcpKeepAlive=true" diff --git a/bin/pulsar-admin-common.cmd b/bin/pulsar-admin-common.cmd index 013d9ef4a55b6..fea512cfca32c 100644 --- a/bin/pulsar-admin-common.cmd +++ b/bin/pulsar-admin-common.cmd @@ -48,7 +48,7 @@ for %%a in ("%PULSAR_LOG_CONF%") do SET "PULSAR_LOG_CONF_BASENAME=%%~nxa" set "PULSAR_CLASSPATH=%PULSAR_CLASSPATH%;%PULSAR_LOG_CONF_DIR%" set "OPTS=%OPTS% -Dlog4j.configurationFile="%PULSAR_LOG_CONF_BASENAME%"" -set "OPTS=%OPTS% -Djava.net.preferIPv4Stack=true" +set "OPTS=-Djava.net.preferIPv4Stack=true %OPTS%" set "isjava8=false" FOR /F "tokens=*" %%g IN ('"java -version 2>&1"') do ( diff --git a/bin/pulsar-admin-common.sh b/bin/pulsar-admin-common.sh index 8aa21c00f634d..1b242c6d4b782 100755 --- a/bin/pulsar-admin-common.sh +++ b/bin/pulsar-admin-common.sh @@ -89,7 +89,7 @@ fi PULSAR_CLASSPATH="$PULSAR_JAR:$PULSAR_CLASSPATH:$PULSAR_EXTRA_CLASSPATH" PULSAR_CLASSPATH="`dirname $PULSAR_LOG_CONF`:$PULSAR_CLASSPATH" OPTS="$OPTS -Dlog4j.configurationFile=`basename $PULSAR_LOG_CONF`" -OPTS="$OPTS -Djava.net.preferIPv4Stack=true" +OPTS="-Djava.net.preferIPv4Stack=true $OPTS" IS_JAVA_8=$( $JAVA -version 2>&1 | grep version | grep '"1\.8' ) # Start --add-opens options diff --git a/bin/pulsar-perf b/bin/pulsar-perf index 3aa3ada193663..5f07203641d4f 100755 --- a/bin/pulsar-perf +++ b/bin/pulsar-perf @@ -132,7 +132,7 @@ fi PULSAR_CLASSPATH="$PULSAR_JAR:$PULSAR_CLASSPATH:$PULSAR_EXTRA_CLASSPATH" PULSAR_CLASSPATH="`dirname $PULSAR_LOG_CONF`:$PULSAR_CLASSPATH" -OPTS="$OPTS -Dlog4j.configurationFile=`basename $PULSAR_LOG_CONF` -Djava.net.preferIPv4Stack=true" +OPTS="-Djava.net.preferIPv4Stack=true $OPTS -Dlog4j.configurationFile=`basename $PULSAR_LOG_CONF`" IS_JAVA_8=$( $JAVA -version 2>&1 | grep version | grep '"1\.8' ) # Start --add-opens options diff --git a/src/pulsar-io-gen.sh b/src/pulsar-io-gen.sh index a3083e8f2b549..9f5b1a6058c7b 100755 --- a/src/pulsar-io-gen.sh +++ b/src/pulsar-io-gen.sh @@ -108,7 +108,7 @@ fi PULSAR_CLASSPATH="$PULSAR_JAR:$PULSAR_HOME/pulsar-io/docs/target/pulsar-io-docs.jar:$PULSAR_CLASSPATH:$PULSAR_EXTRA_CLASSPATH" PULSAR_CLASSPATH="`dirname $PULSAR_LOG_CONF`:$PULSAR_CLASSPATH" -OPTS="$OPTS -Dlog4j.configurationFile=`basename $PULSAR_LOG_CONF` -Djava.net.preferIPv4Stack=true" +OPTS="-Djava.net.preferIPv4Stack=true $OPTS -Dlog4j.configurationFile=`basename $PULSAR_LOG_CONF`" OPTS="-cp $PULSAR_CLASSPATH $OPTS" OPTS="$OPTS $PULSAR_EXTRA_OPTS"