Cassandra SSL Storage port 7001 not binding with IPV6 address

Author: mrvthi

I need to configure IPv6 based cassandra setup, for that did all the recommended changes, but SSL storage port 7001, not binding with IPv6 address :: or the configured Ipv6 address, is there any config changes required specifically for ipv6, since ipv4 works fine as shown below.

I had done all the recommended changes like:

  1. comment out the following line in the file /etc/cassandra/jvm.options -Djava.net.preferIPv4Stack=true
  2. uncomment or edit properties in cassandra.yaml. rpc_interface_prefer_ipv6=true listen_interface_prefer_ipv6=true

Expected(For ipv4 properly connecting at this stage:) 11:09:04.316 [main] INFO o.a.c.io.sstable.IndexSummaryManager - Initializing index summary manager with a memory pool size of 101 MB and a resize interval of 60 minutes 11:09:04.332 [main] INFO o.a.cassandra.net.MessagingService - Starting Encrypted Messaging Service on SSL port 7001

Actual Results for IPv6(errored out for ipv6): 23:17:56.537 [main] INFO o.a.c.io.sstable.IndexSummaryManager - Initializing index summary manager with a memory pool size of 101 MB and a resize interval of 60 minutes Unable to create ssl socket Fatal configuration error; unable to start server. See log for stacktrace. 23:17:56.555 [main] ERROR o.a.c.service.CassandraDaemon - Fatal configuration error org.apache.cassandra.exceptions.ConfigurationException: Unable to create ssl socket at org.apache.cassandra.net.MessagingService.getServerSockets(MessagingService.java:521) ~[apache-cassandra-3.9.jar:3.9] at org.apache.cassandra.net.MessagingService.listen(MessagingService.java:501) ~[apache-cassandra-3.9.jar:3.9] at org.apache.cassandra.net.MessagingService.listen(MessagingService.java:485) ~[apache-cassandra-3.9.jar:3.9] at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:745) ~[apache-cassandra-3.9.jar:3.9] at org.apache.cassandra.service.StorageService.initServer(StorageService.java:648) ~[apache-cassandra-3.9.jar:3.9] at org.apache.cassandra.service.StorageService.initServer(StorageService.java:548) ~[apache-cassandra-3.9.jar:3.9] at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:385) [apache-cassandra-3.9.jar:3.9] at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:601) [apache-cassandra-3.9.jar:3.9] at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:730) [apache-cassandra-3.9.jar:3.9] Caused by: java.net.SocketException: Protocol family unavailable at java.net.PlainSocketImpl.socketBind(Native Method) ~[na:1.8.0_102]

Originally Sourced from: https://stackoverflow.com/questions/57446678/cassandra-ssl-storage-port-7001-not-binding-with-ipv6-address