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

Running Logstash under Java 11 results in warnings about 'illegal reflective access' #10496

Open
robbavey opened this issue Feb 26, 2019 · 5 comments

Comments

@robbavey
Copy link
Contributor

@robbavey robbavey commented Feb 26, 2019

When running Logstash 6.7.0 Build Candidate with OpenJDK Java 11, warnings about IllegalReflectiveAccess are displayed:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.util.SecurityHelper (file:/Users/robbavey/test/6.7.0bc3/logstash-6.7.0/logstash-core/lib/jars/jruby-complete-9.2.6.0.jar) to field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of org.jruby.util.SecurityHelper
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```

This appears to be related to a known issue in JRuby.

This comment describes a mitigation to avoid the warnings. Adding the following to jvm.options (caveat: only tested with a very simple pipeline) will allow Logstash to start without warning in Java 11, but prevents Logstash from starting up on Java 8:

--add-opens=java.base/java.lang=ALL-UNNAMED 
--add-opens=java.base/java.security=ALL-UNNAMED 
--add-opens=java.base/java.util=ALL-UNNAMED 
--add-opens=java.base/java.security.cert=ALL-UNNAMED 
--add-opens=java.base/java.util.zip=ALL-UNNAMED 
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED 
--add-opens=java.base/java.util.regex=ALL-UNNAMED 
--add-opens=java.base/java.net=ALL-UNNAMED 
--add-opens=java.base/java.io=ALL-UNNAMED 
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/javax.crypto=ALL-UNNAMED
--add-opens=java.management/sun.management=ALL-UNNAMED
@rwaight

This comment has been minimized.

Copy link
Contributor

@rwaight rwaight commented May 20, 2019

Thanks for raising this @robbavey, if it makes a difference, this also impacts Logstash 7.1.0 running under Java 11

@karenzone

This comment has been minimized.

Copy link
Contributor

@karenzone karenzone commented May 22, 2019

@karenzone Note to self: Track this issue for other impacts.

@alilland

This comment has been minimized.

Copy link

@alilland alilland commented Sep 18, 2019

@karenzone also impacts Logstash 7.3.0

@karenzone

This comment has been minimized.

Copy link
Contributor

@karenzone karenzone commented Sep 19, 2019

Note to self: Known JRuby issue referenced earlier has been closed.

RELATED DOCS PR: #10498

@karenzone

This comment has been minimized.

Copy link
Contributor

@karenzone karenzone commented Sep 19, 2019

Documented in #11152 per issue #10498.

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