Thanks Michael, Actually I find the problem is with the sever setup, I put "rpc_address: 0.0.0.0" in the config, and I find the sever bind to the address like this:
tcp 0 0 :::9160 :::* LISTEN 2411582/java tcp 0 0 ::ffff:0.0.0.0:9042 :::* LISTEN 2411582/java So using the sever ip "2401:db00:11:60ed:face:0:31:0", I can connect to the thrift port 9160, but not the native port 9042. Do you know the reason for this? Thanks Dikang. On Wed, Nov 4, 2015 at 12:29 PM, Michael Shuler <mich...@pbandjelly.org> wrote: > On 11/04/2015 11:17 AM, Dikang Gu wrote: > >> I have ipv6 only cassandra cluster, and I'm trying to connect to it >> using java driver, like: >> >> Inet6Address inet6 = (Inet6Address) >> InetAddress.getByName("2401:db00:0011:60ed:face:0000:0031:0000"); >> cluster = Cluster.builder().addContactPointsWithPorts(Arrays.asList(new >> InetSocketAddress(inet6,9042))).build(); >> session =cluster.connect(CASSANDRA_KEYSPACE); >> >> But it failed to connect to the cassandra, looks like the java driver >> does not parse the ipv6 address correctly, exceptions are: >> >> <snip> > > Open a JIRA bug report for the java driver at: > > https://datastax-oss.atlassian.net/browse/JAVA > > As for IPv6 testing for Cassandra in general, it has been brought up, but > little testing is done at this time. If you have some contributions to be > made in this area, I'm sure they would be greatly appreciated. You are in a > relatively unique position with an IPv6-only cluster, so your input is > valuable. > > > > https://issues.apache.org/jira/issues/?jql=project%20%3D%20CASSANDRA%20AND%20text%20~%20ipv6%20AND%20status%20!%3D%20Resolved > > -- > Kind regards, > Michael > > -- Dikang