Cassandra Nodetool URISyntaxException: 'Malformed IPv6 address at index 7'
Asked Answered
D

2

19

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?

Doerr answered 16/5, 2022 at 11:6 Comment(0)
D
29

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
Doerr answered 16/5, 2022 at 11:8 Comment(1)
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"Indoeuropean
H
16

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.

Halftruth answered 26/5, 2022 at 18:53 Comment(2)
Do you know the Apache JIRA issue this was fixed under?Rowden
@Rowden 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.4Halftruth

© 2022 - 2024 — McMap. All rights reserved.