diff --git a/bin/bookkeeper b/bin/bookkeeper index 2290960c56690..7d122e26cd07e 100755 --- a/bin/bookkeeper +++ b/bin/bookkeeper @@ -163,6 +163,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 da5387d333d75..a1f81c43b4457 100755 --- a/bin/function-localrunner +++ b/bin/function-localrunner @@ -86,6 +86,9 @@ 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`" +# Allow Netty to use reflection access +OPTS="$OPTS -Dio.netty.tryReflectionSetAccessible=true" + # Ensure we can read bigger content from ZK. (It might be # rarely needed when trying to list many z-nodes under a # directory) diff --git a/bin/pulsar b/bin/pulsar index 3821594d5d5ed..a6453a63abfa5 100755 --- a/bin/pulsar +++ b/bin/pulsar @@ -276,6 +276,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 bac6b73640eed..9df01ec9dd06e 100644 --- a/pom.xml +++ b/pom.xml @@ -1315,6 +1315,7 @@ flexible messaging model and an intuitive client API. -Dpulsar.allocator.pooled=false -Dpulsar.allocator.leak_detection=Advanced -Dpulsar.allocator.exit_on_oom=false + -Dio.netty.tryReflectionSetAccessible=true ${test.additional.args} ${testReuseFork}