4

Why does running nodetool return the following exception?

nodetool: Failed to connect to '127.0.0.1:7199' - \
  URISyntaxException: 'Malformed IPv6 address at index 7: rmi://[127.0.0.1]:7199'.

This question is commonly reported by Cassandra users after upgrading Java on servers.

1 Answer 1

4

Root cause

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 newer Java versions 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";

Workarounds

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

Solution

This issue has been addressed in Apache Cassandra 3.0.27, 3.11.13, 4.0.4 and 4.1 releases (CASSANDRA-17581).

Upgrade to the latest patch release to fix the issue in your cluster. Cheers!


Republished from DataStax Community.


👉 Please support the Apache Cassandra community by hovering over then click on the Watch tag button. 🙏 Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.