Skip to content

Commit 3e7ec18

Browse files
committed
Add note about illegal reflective access
Fixes elastic#11152
1 parent 0953ad9 commit 3e7ec18

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

docs/static/troubleshooting.asciidoc

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ executable files to the temp directory. This situation causes subsequent failure
3030

3131
*Sample error*
3232

33+
[source,sh]
3334
-----
3435
[2018-03-25T12:23:01,149][ERROR][org.logstash.Logstash ]
3536
java.lang.IllegalStateException: org.jruby.exceptions.RaiseException:
@@ -45,6 +46,58 @@ Operation not permitted
4546
* Specify an alternate directory using the `-Djava.io.tmpdir` setting in the `jvm.options` file.
4647
4748
49+
[float]
50+
[[ts-startup]]
51+
== {ls} start up
52+
53+
[float]
54+
[[ts-illegal-reflective-error]]
55+
=== 'Illegal reflective access' errors
56+
57+
// https://github.com/elastic/logstash/issues/10496 and https://github.com/elastic/logstash/issues/10498
58+
59+
Running Logstash with Java 11 results in warnings similar to these:
60+
61+
[source,sh]
62+
-----
63+
WARNING: An illegal reflective access operation has occurred
64+
WARNING: Illegal reflective access by org.jruby.util.SecurityHelper (file:/Users/chrisuser/logstash-6.7.0/logstash-core/lib/jars/jruby-complete-9.2.6.0.jar) to field java.lang.reflect.Field.modifiers
65+
WARNING: Please consider reporting this to the maintainers of org.jruby.util.SecurityHelper
66+
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
67+
WARNING: All illegal access operations will be denied in a future release
68+
-----
69+
70+
These errors appear related to https://github.com/jruby/jruby/issues/4834[a known issue with JRuby].
71+
72+
*Work around*
73+
74+
Try adding these values to the `jvm.options` file.
75+
76+
[source,sh]
77+
-----
78+
--add-opens=java.base/java.lang=ALL-UNNAMED
79+
--add-opens=java.base/java.security=ALL-UNNAMED
80+
--add-opens=java.base/java.util=ALL-UNNAMED
81+
--add-opens=java.base/java.security.cert=ALL-UNNAMED
82+
--add-opens=java.base/java.util.zip=ALL-UNNAMED
83+
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED
84+
--add-opens=java.base/java.util.regex=ALL-UNNAMED
85+
--add-opens=java.base/java.net=ALL-UNNAMED
86+
--add-opens=java.base/java.io=ALL-UNNAMED
87+
--add-opens=java.base/java.lang=ALL-UNNAMED
88+
--add-opens=java.base/javax.crypto=ALL-UNNAMED
89+
--add-opens=java.management/sun.management=ALL-UNNAMED
90+
-----
91+
92+
*Notes:*
93+
94+
* These settings allow Logstash to start without warnings in Java 11, but they
95+
prevent Logstash from starting on Java 8.
96+
* This workaround has been tested with simple pipelines. If you have experiences
97+
to share, please comment in the
98+
https://github.com/elastic/logstash/issues/10496[issue].
99+
100+
48101
[float]
49102
[[ts-ingest]]
50103
== Data ingestion

0 commit comments

Comments
 (0)