From 68bbe8ba4a9699aeb1e3f10c67fbba7c667ce174 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Wed, 3 Aug 2016 13:52:15 -0400 Subject: [PATCH] Explicitly tell Netty to not use unsafe With the security permissions that we grant to Netty, Netty can not access unsafe (because it relies on having the runtime permission accessDeclaredMembers and the reflect permission suppressAccessChecks). Instead, we should just explicitly tell Netty to not use unsafe. This commit adds a flag to the default jvm.options to tell Netty to not look for unsafe. --- distribution/src/main/resources/config/jvm.options | 3 +++ 1 file changed, 3 insertions(+) diff --git a/distribution/src/main/resources/config/jvm.options b/distribution/src/main/resources/config/jvm.options index fecb7e00493a6..2feba02550998 100644 --- a/distribution/src/main/resources/config/jvm.options +++ b/distribution/src/main/resources/config/jvm.options @@ -59,6 +59,9 @@ # use our provided JNA always versus the system one -Djna.nosys=true +# flag to explicitly tell Netty to not use unsafe +-Dio.netty.noUnsafe=true + ## heap dumps # generate a heap dump when an allocation from the Java heap fails