Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JDK 11 support #5909

Merged
merged 1 commit into from Jul 23, 2019

Conversation

@bernd
Copy link
Member

commented Apr 26, 2019

This PR updates the server code base to support JDK 11.

This also requires updates to a few plugins due to the UUID changes.

There is a warning that is printed on server startup:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.assistedinject.FactoryProvider2$MethodHandleWrapper (file:/home/bernd/.m2/repository/com/google/inject/extensions/guice-assistedinject/4.2.2/guice-assistedinject-4.2.2.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of com.google.inject.assistedinject.FactoryProvider2$MethodHandleWrapper
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Seems to be related to google/guice#1216 and google/guice#1133.

@bernd bernd added this to the 3.1.0 milestone Apr 26, 2019

@bernd bernd force-pushed the jdk-11 branch 2 times, most recently from 42f690e to 7a970eb Apr 26, 2019

@yfreund-ionos

This comment has been minimized.

Copy link

commented Jul 22, 2019

Thanks for taking the time working on this - we're really looking forward to java 11 support.

Is this likely to make it into 3.1.0, since it's not included in the current beta release?

Add JDK 11 support
- Use our own fork of com.eaio.uuid:uuid which has been modified to work
  with JDK 11
- Add javax.xml.bind:jaxb-api dependency (fixes runtime dependency issue)
- Remove unused sun.security.provider.SHA
- Fix duplicate key exception in LocalesResponse#create()

@bernd bernd force-pushed the jdk-11 branch from 7a970eb to 84fbb5a Jul 22, 2019

@mpfz0r

This comment has been minimized.

Copy link
Member

commented Jul 23, 2019

Compiles fine on macos with

java version "1.8.0_192"
Java(TM) SE Runtime Environment (build 1.8.0_192-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.192-b12, mixed mode)

Runs fine with

openjdk version "11.0.4" 2019-07-16
OpenJDK Runtime Environment (build 11.0.4+11-post-Debian-1deb10u1)
OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Debian-1deb10u1, mixed mode, sharing)

If you remove -XX:+UseParNewGC

diff --git a/bin/graylogctl b/bin/graylogctl
index 8129731f7..21697c6fd 100755
--- a/bin/graylogctl
+++ b/bin/graylogctl
@@ -51,7 +51,7 @@ GRAYLOG_CONF=${GRAYLOG_CONF:=/etc/graylog/server/server.conf}
 GRAYLOG_PID=${GRAYLOG_PID:=/tmp/graylog.pid}
 LOG_FILE=${LOG_FILE:=log/graylog-server.log}
 LOG4J=${LOG4J:=}
-DEFAULT_JAVA_OPTS="-Djava.library.path=${GRAYLOGCTL_DIR}/../lib/sigar -Xms1g -Xmx1g -XX:NewRatio=1 -server -XX:+ResizeTLAB -XX:+UseConcMarkSweepGC -XX:+CMSConcurrentMTEnabled -XX:+CMSClassUnloadingEnabled -XX:+UseParNewGC -XX:-OmitStackTraceInFastThrow"
+DEFAULT_JAVA_OPTS="-Djava.library.path=${GRAYLOGCTL_DIR}/../lib/sigar -Xms1g -Xmx1g -XX:NewRatio=1 -server -XX:+ResizeTLAB -XX:+UseConcMarkSweepGC -XX:+CMSConcurrentMTEnabled -XX:+CMSClassUnloadingEnabled -XX:-OmitStackTraceInFastThrow"
 JAVA_OPTS="${JAVA_OPTS:="$DEFAULT_JAVA_OPTS"}"

Compiling with java 11 needs a bit more work.
I had to remove errorprone, forbiddenapis from the build.

@bernd

This comment has been minimized.

Copy link
Member Author

commented Jul 23, 2019

@mpfz0r Thanks for testing! I think it's fine if we can run with JDK 11 for now. Building with it can be a separate step.

@bernd bernd marked this pull request as ready for review Jul 23, 2019

@bernd bernd requested a review from mpfz0r Jul 23, 2019

@mpfz0r
mpfz0r approved these changes Jul 23, 2019
Copy link
Member

left a comment

LGTM 👍

@mpfz0r mpfz0r merged commit fe371bc into master Jul 23, 2019

4 checks passed

ci-web-linter Jenkins build graylog-pr-linter-check 3944 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
graylog-project/pr Jenkins build graylog-project-pr-snapshot 4816 has succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@mpfz0r mpfz0r deleted the jdk-11 branch Jul 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.