cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martijn Pieters <>
Subject IPv6-only host, can't seem to get Cassandra to bind to a public port
Date Tue, 11 Apr 2017 10:37:19 GMT
I’m having issues getting a single-node Cassandra cluster to run on a Ubuntu 16.04 VM with
only IPv6 available. I’m running Oracle Java 8 (8u121-1~webupd8~2), Cassandra 3.10 (installed
via the Cassandra packages.)

I consistently get a “Protocol family unavailable” exception:

ERROR [main] 2017-04-11 09:54:23,991 - Exception encountered during
java.lang.RuntimeException: Protocol family unavailable
        at ~[apache-cassandra-3.10.jar:3.10]
        at ~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.service.StorageService.prepareToJoin(
        at org.apache.cassandra.service.StorageService.initServer(
        at org.apache.cassandra.service.StorageService.initServer(
        at org.apache.cassandra.service.CassandraDaemon.setup( [apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.service.CassandraDaemon.activate(
        at org.apache.cassandra.service.CassandraDaemon.main( [apache-cassandra-3.10.jar:3.10]
Caused by: Protocol family unavailable
        at Method) ~[na:1.8.0_121]
        at ~[na:1.8.0_121]
        at ~[na:1.8.0_121]
        at ~[na:1.8.0_121]
        at ~[na:1.8.0_121]
        ... 8 common frames omitted

`lo` (loopback) has both `inet` and `inet6` addresses, but `eth0` has no `inet` addresses,
so only inet6 addr entries (both a local and a global scope address are configured).

My configuration changes:

listen_address: <local or global scope IPv6 address>
listen_interface_prefer_ipv6: true

Tracing through the source code the exception shows that it is the listen_address value above
that throws the exception, changing it back to makes the server work again (but
then I don’t get to use it on my local network). I tried both the local and the global scope
IPv6 address.

I tried changing the JVM configuration to prefer IPv6 by editing /etc/cassandra/

--- etc/cassandra/      2017-01-31 16:29:32.000000000 +0000
+++ /etc/cassandra/     2017-04-11 09:52:51.456000000 +0000
@@ -290,6 +290,9 @@
# to the location of the native libraries.
JVM_OPTS="$JVM_OPTS -Djava.library.path=$CASSANDRA_HOME/lib/sigar-bin"


But this makes no difference

I also tried using `listen_interface` instead, but that only changes the error message to:

    ERROR [main] 2017-04-11 10:35:16,426 - Exception encountered
during startup: Configured listen_interface "eth0" could not be found

What else can I do?

Martijn Pieters
View raw message