Use cases for listen address

Various use cases and correct cassandra.yaml settings for listen_address.


The location of the cassandra.yaml file depends on the type of installation:
Package installations /etc/dse/cassandra/cassandra.yaml
Tarball installations installation_location/resources/cassandra/conf/cassandra.yaml
Correct cassandra.yaml listen_address settings for various use cases.
  • Never set listen_address to
  • Set listen_address or listen_interface, do not set both.
  • Single-node installations: do one of the following:
    • Comment out the listen_address property. If the node is properly configured (host name, name resolution, and so on), the database uses InetAddress.getLocalHost() to get the local address from the system.
    • Leave the default setting, localhost.
  • Node in a multi-node installations: set the listen_address property to the node's IP address or hostname, or set listen_interface.
  • Node in a multi-network or multi-datacenter installation, within an EC2 environment that supports automatic switching between public and private interfaces: set listen_address to the node's IP address or hostname, or set listen_interface.
  • Node with two physical network interfaces in a multi-datacenter installation or cluster deployed across multiple Amazon EC2 regions using the Ec2MultiRegionSnitch:
    1. Set listen_address to this node's private IP or hostname, or set listen_interface (for communication within the local datacenter).
    2. Set broadcast_address to the second IP or hostname (for communication between datacenters).
    3. Set listen_on_broadcast_address to true.
    4. If this node is a seed node, add the node's public IP address or hostname to the seeds list.
  • Open the storage_port or ssl_storage_port on the public IP firewall.