I would like to run Cassandra Datastax Enterprise on Amazon EC2 instances using not the node private IP address but Elastic Public IPs
My current configuration looks as follows:
/etc/dse/cassandra/cassandra.yaml seed_provider: - class_name: org.apache.cassandra.locator.SimpleSeedProvider parameters: seeds: "publicIP" listen_address: "publicIP" endpoint_snitch:Ec2Snitch rpc_address: "publicIP"
The "dse" service is not starting properly.
/var/log/cassandra/system.log is showing the following error:
org.apache.cassandra.exceptions.ConfigurationException: Unable to bind to address /<publicIP>:7000. Set listen_address in cassandra.yaml to an interface you can bind to, e.g., your private IP address on EC2
I have also tried to change the broadcast_address to point to the public IP address but it doesn't work.
Is there any way of running dse service (Cassandra) in a way it uses the elastic IP addresses and not the private IPs of EC2 boxes?
Not a new question here, but looking at your config, make these changes.
listen_address: private_ip broadcast_address: public_ip rpc_address: 0.0.0.0
Seeds should be public_ip so you're ok there.
Three addresses avaliable in Cassandra.yaml
Listen Address - This is the ip address other Cassandra nodes will use to talk to this node. You want this to be your internal AWS IP Address for performance.
RPC Address - This is the address your client connects to, probably the one you want to configure to match your external AWS address if your client is not sitting in AWS or in the same AWS region.
Broadcast Address - If you are using multiple data centers or AWS Regions, where not all the nodes have access to each other via internal IP. You can specify the external IP address for the nodes in different data centers can still talk to each other. In many cases you don't need this setting at all, it will default to your Listen Address.
I think the answer to your question is use the RPC address to connect to C* from your client using the external/elastic AWS IP. You can probably leave the Broadcast Address un-configured.
Does this help?