Use cases for listen address

Correct cassandra.yaml listen_address settings for various use cases.

  • Never set listen_address to 0.0.0.0.

  • 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.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com