You need to edit cassandra.yaml
on the node you are trying to connect to and set the node ip address for rpc_address
and listen_address
and restart Cassandra.
rpc_address
is the address on which Cassandra listens to the client calls.
listen_address
is the address on which Cassandra listens to the other Cassandra nodes.