0

I'm trying to install cassandra as a single node server in a way such that I can connect from a remote machine within the same private subnet (10.10.10.0/24). I added the cassandra repo to the debian machine and installed cassandra via apt install cassandra.

Then I tried modifying the /etc/cassandra/cassandra.yaml (like explained here) and set:

listen_address: 10.10.10.2 (also tried localhost)
rpc_address: 0.0.0.0
broadcast_rpc_address: 10.10.10.2
seed_provider:
  - class_name: ...
    parameters:
      - seeds: "10.10.10.2"

When I run ss -tulpen I can see nothing listening on 9042 on any IP. Also cannot connect to the server.

How can I make cassandra bind to the IP and expose 9042 to the remote machine?


Maybe helpful:

  1. From systemctl status cassandra I can see an error /etc/init.d/cassandra: 72: ulimit: error setting limit (Operation not permitted) but the service is starting anyway. Also if I change the /etc/cassandra/cassandra.yaml to something that should not work or even delete the file, cassandra is still happily starting and running. This makes me wonder if that file is even being used?

  2. cassandra version

     $ cassandra -v
     4.0.5
    
  3. neither systemctl status cassandra nor journalctl -u cassandra nor /var/log/cassandra/ have any errors. I also tried running VERBOSE=1 systemctl restart cassandra to make it log more but that didn't seem to work.

  4. I'm running cassandra inside a proxmox container (thats probably the error with the ulimit do I have to change this?

  5. I have disable ufw for the time being.

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23
gxor
  • 335
  • 3
  • 11
  • A friendly reminder that this site is for getting help with coding, algorithm, or programming language problems so I voted to have your post moved to [DBA Stack Exchange](https://dba.stackexchange.com/questions/ask?tags=cassandra). For future reference, you should post DB admin/ops questions on https://dba.stackexchange.com/questions/ask?tags=cassandra. Cheers! – Erick Ramirez Feb 23 '23 at 00:45

1 Answers1

0

There is insufficient information in your post to determine the real problem. There is a good chance that the issue is not a case of Cassandra binding port 9042 to the IP but just not able to start at all.

You will need to check the Cassandra system.log for clues as to the real problem. My guess is that you have misconfigured something else so Cassandra is unable to start properly.

As a side note, it is not necessary to configure broadcast_rpc_address. This isn't the cause of your issue but I wanted to point out that you just need to configure listen_address to a private IP and rpc_address to a public IP -- "public" in the sense that it is an IP that is reachable by client applications. Cheers!

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23