I'm running a cluster on google cloud, where the nodes communicate using their internal IP addresses.
When connecting to the cluster from external client using the the nodes' external IP addresses, these internal IPs gets returned as hosts, which makes the connection pool produce warnings since it can't connect to them.
In [2]: MyCluster.connect()
In [3]: WARNING:cassandra.pool:Error attempting to reconnect to 10.10.10.5, scheduling retry in 2.0 seconds: timed out
WARNING:cassandra.pool:Error attempting to reconnect to 10.10.10.9, scheduling retry in 2.0 seconds: timed out
WARNING:cassandra.pool:Error attempting to reconnect to 10.10.10.6, scheduling retry in 2.0 seconds: timed out
WARNING:cassandra.pool:Error attempting to reconnect to 10.10.10.9, scheduling retry in 4.0 seconds: timed out
WARNING:cassandra.pool:Error attempting to reconnect to 10.10.10.5, scheduling retry in 4.0 seconds: timed out
WARNING:cassandra.pool:Error attempting to reconnect to 10.10.10.6, scheduling retry in 4.0 seconds: timed out
In [26]: cqlengine.connection.session.hosts
Out[26]:
[<Host: 104.10.10.2 euwestb>,
<Host: 10.10.10.5 euwestb>,
<Host: 146.10.10.9>,
<Host: 10.10.10.8 euwestb>,
<Host: 104.10.10.8>,
<Host: 10.10.10.6 euwestb>,
<Host: 104.10.10.1>]