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
Was this topic helpful?
Document Information
Modified date:
21 June 2022
UID
ibm16593557