17

Cassandra nodetool throws an error after updating OpenJDK

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

This also affects the current official Docker-Hub Image https://hub.docker.com/_/cassandra version 3.11.12

How can I fix this error?

Florian
  • 421
  • 1
  • 4
  • 8

2 Answers2

25

There seems to be an issue with "improved" IPv6 address parsing in the latest jdk update.
The workaround would be to use the IPv6 notation of localhost

nodetool -h ::FFFF:127.0.0.1 status
Florian
  • 421
  • 1
  • 4
  • 8
  • 2
    It also appears to impact any value put in for host. Hostnames that resolve to IPv4 addresses, and not only localhost. Add this to your nodetool command and it should fall back to the previous JDK behavior: "-Dcom.sun.jndi.rmiURLParsing=legacy" – diq May 25 '22 at 18:58
13

You can upgrade to Apache Cassandra 3.11.13 or use this command:

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

Another way is to add this -Dcom.sun.jndi.rmiURLParsing=legacy to JAVA_TOOL_OPTIONS environment variable.

  • Do you know the Apache JIRA issue this was fixed under? – Azeroth2b Jun 24 '22 at 15:52
  • 1
    @Azeroth2b I don't know the Jira number, I was going off of the Datastax Support Alert email. Here are the affected/fixed versions: 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 – Wawrzyniec Pruski Jun 28 '22 at 18:50