0

I am using phantom 2.12.1 with cassandra 5.2.

I am running cassandra using docker and I keep getting this nasty error:

any idea what can cause that ?

Caused by: java.lang.IllegalArgumentException: Cannot build a cluster without contact points at com.datastax.driver.core.Cluster.checkNotEmpty(Cluster.java:119) at com.datastax.driver.core.Cluster.(Cluster.java:112) at com.datastax.driver.core.Cluster.buildFrom(Cluster.java:178) at com.datastax.driver.core.Cluster$Builder.build(Cluster.java:1335) at com.outworkers.phantom.connectors.DefaultSessionProvider.(DefaultSessionProvider.scala:41) at com.outworkers.phantom.connectors.CassandraConnection.provider$lzycompute(CassandraConnection.scala:41) at com.outworkers.phantom.connectors.CassandraConnection.provider(CassandraConnection.scala:41) at com.outworkers.phantom.connectors.CassandraConnection$Connector$class.provider(CassandraConnection.scala:91)

igx
  • 4,101
  • 11
  • 43
  • 88

2 Answers2

1

The issue also happens when the IP cannot be resolved for the provided hostnames. Thats how the implementation is in DataStax Driver.

Please see the below link for more information

Datastax Java Driver does not connect if one host is missing

As one of the answer says "If you are specifying ip addresses to begin with, they will not be resolved, simply checked for validity. If you are using hostnames then each contact point will need to be resolvable."

If using valid hosts work around is to provide IP addresses directly as connect endpoint so that DNS lookup is bypassed or to remove the hosts which are having issues with DNS look up.

MRTJ
  • 141
  • 7
0

The error message is fairly explicit; your contact point ends up being passed an empty sequence as the hosts argument.

Check your configuration and make sure when you call ContactPoint inside your connector definition the sequence is not empty

flavian
  • 28,161
  • 11
  • 65
  • 105