diff --git a/bin/bookkeeper b/bin/bookkeeper index 57435d9089b05..65e3cb449299e 100755 --- a/bin/bookkeeper +++ b/bin/bookkeeper @@ -161,6 +161,9 @@ BOOKIE_CLASSPATH="$BOOKIE_JAR:$BOOKIE_CLASSPATH:$BOOKIE_EXTRA_CLASSPATH" BOOKIE_CLASSPATH="`dirname $BOOKIE_LOG_CONF`:$BOOKIE_CLASSPATH" OPTS="$OPTS -Dlog4j.configurationFile=`basename $BOOKIE_LOG_CONF`" +# Allow Netty to use reflection access +OPTS="$OPTS -Dio.netty.tryReflectionSetAccessible=true" + OPTS="-cp $BOOKIE_CLASSPATH $OPTS" OPTS="$OPTS $BOOKIE_EXTRA_OPTS" diff --git a/bin/function-localrunner b/bin/function-localrunner index fb36eb20383ce..09f1db94005a7 100755 --- a/bin/function-localrunner +++ b/bin/function-localrunner @@ -21,6 +21,9 @@ BINDIR=$(dirname "$0") export PULSAR_HOME=`cd -P $BINDIR/..;pwd` . "$PULSAR_HOME/bin/pulsar-admin-common.sh" +# Allow Netty to use reflection access +OPTS="$OPTS -Dio.netty.tryReflectionSetAccessible=true" + # functions related variables FUNCTIONS_HOME=$PULSAR_HOME/pulsar-functions diff --git a/bin/pulsar b/bin/pulsar index 1e8439ea77013..1f50140032107 100755 --- a/bin/pulsar +++ b/bin/pulsar @@ -279,6 +279,9 @@ OPTS="$OPTS -Dlog4j.configurationFile=`basename $PULSAR_LOG_CONF`" # directory) OPTS="$OPTS -Djute.maxbuffer=10485760 -Djava.net.preferIPv4Stack=true" +# Allow Netty to use reflection access +OPTS="$OPTS -Dio.netty.tryReflectionSetAccessible=true" + OPTS="-cp $PULSAR_CLASSPATH $OPTS" if [ $COMMAND == "bookie" ]; then diff --git a/pom.xml b/pom.xml index 7aadd738b5584..9558eefff7152 100644 --- a/pom.xml +++ b/pom.xml @@ -1132,6 +1132,7 @@ flexible messaging model and an intuitive client API. -Dpulsar.allocator.leak_detection=Advanced -Dpulsar.allocator.exit_on_oom=false -Dlog4j.configurationFile=log4j2.xml + -Dio.netty.tryReflectionSetAccessible=true ${test.additional.args} ${testReuseFork}