[
https://issues.apache.org/jira/browse/CASSANDRA-19001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17783439#comment-17783439
]
Ekaterina Dimitrova edited comment on CASSANDRA-19001 at 11/7/23 1:22 AM:
--------------------------------------------------------------------------
1) Actually, I do not see now the security manager warnings on startup, only on
compile.
But adding a suppression to the ThreadAwareSecurityManager should help with
those _I think:_
{code:java}
@SuppressWarnings("removal")
public final class ThreadAwareSecurityManager extends SecurityManager{code}
[~paulo] , do you mind to test whether this suppression solves completely the
issue for you? I cannot reproduce this startup warning, only compilation.
2) SJK cannot run sjk hh if not run with JDK. Nothing to do there and it gives
an error message that explains that you should not use JRE. I do not like hacks
to remove warnings when they have a real meaning so my suggestion is to add
below comment in the options file. When people setup their Cassandra nodes they
will decide what to do.
{code:java}
# You cannot run nodetool sjk hh without below option with JDK17.
# It will generate a startup warning for missing module when using JRE and not
JDK; sjk hh will not be available.
# If you want to use JRE and not see the warning, you can comment below option.
--add-exports jdk.attach/sun.tools.attach=ALL-UNNAMED{code}
3) I tried running our CI without using the options that generate the reported
warnings. Our CI does not show any problems, except the sjk error mentioned:
[https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra?branch=19001-5.0]
Though we know this doesn't mean there is no hidden problem. I just submitted
an OpenHFT github issue question to verify what potential impact might be.
Better to get advice from the source instead of guessing on my own.
was (Author: e.dimitrova):
1) Actually, I do not see now the security manager warnings on startup, only on
compile.
But adding a suppression to the ThreadAwareSecurityManager should help with
those _I think:_
{code:java}
@SuppressWarnings("removal")
public final class ThreadAwareSecurityManager extends SecurityManager{code}
[~paulo] , do you mind to test whether this suppression solves completely the
issue for you? I cannot reproduce this startup warning, only compilation.
2) SJK cannot run sjk hh if not run with JDK. Nothing to do there and it gives
an error message that explains that. I do not like hacks to remove warnings
when they have a real meaning so my suggestion is to add below comment in the
options file. When people setup their Cassandra nodes they will decide what to
do.
{code:java}
# You cannot run nodetool sjk hh without below option with JDK17.
# It will generate a startup warning for missing module when using JRE and not
JDK; sjk hh will not be available.
# If you want to use JRE and not see the warning, you can comment below option.
--add-exports jdk.attach/sun.tools.attach=ALL-UNNAMED{code}
3) I tried running our CI without using the options that generate the reported
warnings. Our CI does not show any problems, except the sjk error mentioned:
[https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra?branch=19001-5.0]
Though we know this doesn't mean there is no hidden problem. I just submitted
an OpenHFT github issue question to verify what potential impact might be.
Better to get advice from the source instead of guessing on my own.
> Check whether the startup warnings for unknown modules represent a legit
> problem or cosmetic issue
> --------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-19001
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19001
> Project: Cassandra
> Issue Type: Bug
> Components: Local/Other
> Reporter: Ekaterina Dimitrova
> Assignee: Ekaterina Dimitrova
> Priority: Normal
> Fix For: 4.0.x, 4.1.x, 5.0-beta
>
>
> During the 5.0 alpha 2 release
> [vote|https://lists.apache.org/thread/lt3x0obr5cpbcydf5490pj6b2q0mz5zr],
> [~paulo] raised the following concerns:
> {code:java}
> Launched a tarball-based 5.0-alpha2 container on top of
> "eclipse-temurin:17-jre-focal" and the server starts up fine, can run
> nodetool and cqlsh.
> I got these seemingly harmless JDK17 warnings during startup and when
> running nodetool (no warnings on JDK11):
> WARNING: Unknown module: jdk.attach specified to --add-exports
> WARNING: Unknown module: jdk.compiler specified to --add-exports
> WARNING: Unknown module: jdk.compiler specified to --add-opens
> WARNING: A terminally deprecated method in java.lang.System has been called
> WARNING: System::setSecurityManager has been called by
> org.apache.cassandra.security.ThreadAwareSecurityManager
> (file:/opt/cassandra/lib/apache-cassandra-5.0-alpha2-SNAPSHOT.jar)
> WARNING: Please consider reporting this to the maintainers of
> org.apache.cassandra.security.ThreadAwareSecurityManager
> WARNING: System::setSecurityManager will be removed in a future release
> Anybody knows if these warnings are legit/expected ? We can create
> follow-up tickets if needed.
> $ java --version
> openjdk 17.0.9 2023-10-17
> OpenJDK Runtime Environment Temurin-17.0.9+9 (build 17.0.9+9)
> OpenJDK 64-Bit Server VM Temurin-17.0.9+9 (build 17.0.9+9, mixed mode,
> sharing)
> {code}
> {code:java}
> Clarification: - When running nodetool only the "Unknown module" warnings
> show up. All warnings show up during startup.{code}
> We need to verify whether this presents a real problem in the features where
> those modules are expected to be used, or if it is a false alarm.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]