Try connecting without specifying localdatacenter but with specifying DcInferringLoadBalancingPolicy which should discover localdatacenter automatically jdbc:cassandra://localhost:9046/?loadBalancing=DcInferringLoadBalancingPolicy
Expected result
Successful connection
Actual result
Confusing error No node was available to execute the query
Problem
localdatacenter is set to an empty string
Solution
Do not set localdatacenter if it was not specified.
If user set loadBalancing then connection will be successful.
If user didn't set loadBalancing then at least they'll see the correct error message Since you provided explicit contact points, the local DC must be explicitly set
How to reproduce
Try connecting without specifying localdatacenter but with specifying DcInferringLoadBalancingPolicy which should discover localdatacenter automatically
jdbc:cassandra://localhost:9046/?loadBalancing=DcInferringLoadBalancingPolicy
Expected result
Successful connection
Actual result
Confusing error
No node was available to execute the query
Problem
localdatacenter is set to an empty string
Solution
Do not set localdatacenter if it was not specified. If user set
loadBalancing
then connection will be successful. If user didn't setloadBalancing
then at least they'll see the correct error messageSince you provided explicit contact points, the local DC must be explicitly set