IBM Support

Java 8u331/8u332 and 11.0.15 break nodetool and dsetool commands

Flashes (Alerts)


Abstract

After upgrading Java to versions 8u331/8u332 or 11.0.15, nodetool and dsetool commands may fail due to malformed URLs. An example of this is the following error message:

java.io.IOException: Failed to retrieve RMIServer stub:
javax.naming.InvalidNameException: Malformed IPv6 address at index 7: rmi://[127.0.0.1]:7199
Root exception is java.lang.IllegalArgumentException: Malformed IPv6 address at index 7: rmi://[127.0.0.1]:7199

Content

Affected Versions:

•             DataStax Enterprise (DSE) - 5.1.x, 6.0.x, 6.7.x, 6.8.x

•             Apache Cassandra - 3.x, 4.x

Fixed Versions:

•             DataStax Enterprise (DSE) -  5.1.31, 6.8.23

•             Release Dates TBD - 6.0.18, 6.7.17

•             Apache Cassandra - 3.0.27, 3.11.13, 4.1, 4.0.4

Background:

The URL parser for JNDI providers which includes RMI (used by JMX) has been improved in Oracle Java 8u331 and brackets are only allowed around IPv6 addresses (JDK-8278972).

Attempts to run nodetool with Java 8u331/8u332 breaks because the host in the RMI URL is enclosed in square brackets (from NodeProbe.java class):

private static final String fmtUrl = "service:jmx:rmi:///jndi/rmi://[%s]:%d/jmxrmi"; 

Mitigation:

To fix this issue, you may revert Java to a version below 8u331/8u332 or 11.0.15. Alternatively, you can upgrade DSE to the version listed in the Fixed Versions section above.  To work around the issue, there are two available options:

Option 1 - Add the "legacy" parsing flag when running nodetool, for example:

$ nodetool -Dcom.sun.jndi.rmiURLParsing=legacy status

Option 2 - Specify the hostname with an IPv6 subnet prefix, for example:

$ nodetool -h ::FFFF:127.0.0.1 status

[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSK8W7E","label":"DataStax Enterprise with IBM"},"ARM Category":[{"code":"a8m3p000000LRN5AAO","label":"OpenSource DB-\u003EDataStax"}],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
21 June 2022

UID

ibm16593557