scylladb / scylla-jmx

Scylla JMX proxy
GNU Affero General Public License v3.0
28 stars 51 forks source link

Scylla JMX not compatible with Java 17 #217

Open horschi opened 10 months ago

horschi commented 10 months ago

Hi,

it seems scylla-jmx is not compatible with Java 17:

× scylla-jmx.service - Scylla JMX
     Loaded: loaded (/lib/systemd/system/scylla-jmx.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/scylla-jmx.service.d
             └─sysconfdir.conf
     Active: failed (Result: exit-code) since Thu 2023-09-21 15:24:04 UTC; 15s ago
    Process: 1117318 ExecStart=/opt/scylladb/jmx/scylla-jmx $SCYLLA_JMX_PORT $SCYLLA_API_PORT $SCYLLA_API_ADDR $SCYLLA_JMX_ADDR $SCYLLA_JMX_FILE $SCYLLA_JMX_LOCAL $SCYLLA_JMX_REMOTE $SCYLLA_JMX_DEBUG (code=exited, status=1/FAILURE)
   Main PID: 1117318 (code=exited, status=1/FAILURE)
        CPU: 184ms

Sep 21 15:24:04 test-1 systemd[1]: Started Scylla JMX.
Sep 21 15:24:04 test-1 scylla-jmx[1117318]: Picked up JAVA_TOOL_OPTIONS:
Sep 21 15:24:04 test-1 systemd[1]: scylla-jmx.service: Main process exited, code=exited, status=1/FAILURE
Sep 21 15:24:04 test-1 systemd[1]: scylla-jmx.service: Failed with result 'exit-code'.

Unfortunetaly the error does not say much, but it looks like its due to Java 17. If I downgrade Java to 11, then it works again.

Java 11 is removed in a lot of places and replaced by Java 17. Is would be great if scylla would support it too.

Christian

mykaul commented 9 months ago

Our goal should be to rewrite it in different language instead of Java. (or run in a container, with that ancient Java)

nyh commented 9 months ago

Cassandra, on which we based our JMX code, also doesn't yet work with Java 17: https://issues.apache.org/jira/browse/CASSANDRA-16895.

I think what @mykaul was trying to say isn't that we want to rewrite Scylla's JMX support in a different language, but rather that we hope to drop it altogether (or make it optional). Today, most if not all Scylla users don't want to use JMX (the Java-only remote procedure call framework) - they just want "nodetool" to work. The current implementation of nodetool works over JMX which is why we need it, but it doesn't have to be this way. @denesb is working on a "nodetool"-compatible tool which uses Scylla's REST API instead of JMX.

horschi commented 9 months ago

Yes, ideally JMX would be removed entirely. But perhaps its little effort to fix it for Java17, to give denesb more time to provider a proper java-less nodetool.

Java 17 is starting to become mandatory for many things now. So it would be great if scylla would work with it.

horschi commented 9 months ago

Does anyone even have an understanding where this error comes from? I wasn't able to find any clear error message, its just a return status 1 :-(

I guess the proper solution would be: https://github.com/scylladb/scylladb/issues/15588