Cassandra Nodetool URISyntaxException: 'Malformed IPv6 address at index 7'

20.4k Views Asked by At

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?

2

There are 2 best solutions below

1
Florian On

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
2
Wawrzyniec Pruski On

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.