Skip to content

Instantly share code, notes, and snippets.

@andykuszyk
Last active October 31, 2023 07:48
Show Gist options
  • Star 23 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save andykuszyk/7644f334586e8ce29eaf8b93ec6418c4 to your computer and use it in GitHub Desktop.
Save andykuszyk/7644f334586e8ce29eaf8b93ec6418c4 to your computer and use it in GitHub Desktop.
Setting up Cassandra for remote access

Make these changes in the cassandra.yaml config file:

start_rpc: true

rpc_address: 0.0.0.0

broadcast_rpc_address: [node-ip]

listen_address: [node-ip]

seed_provider:
  - class_name: ...
    - seeds: "[node-ip]"
@mariusachim
Copy link

mariusachim commented Sep 8, 2019

Thank you. That was quite helpful.

@anhvandev
Copy link

I want to ask what is 'node-ip'?

@andykuszyk
Copy link
Author

I want to ask what is 'node-ip'?

Good question, its been a while! I think that was the IP address of the host you're setting up for remote access.

@anhvandev
Copy link

Yes, I think so, but I would like to open it for all ip addresses.

@andykuszyk
Copy link
Author

Yes, I think so, but I would like to open it for all ip addresses.

I mean, the IP address of the host that Cassandra is running on (not a whitelist for the client IPs).

@anhvandev
Copy link

Oh, I got it

@ramprakash110109
Copy link

Thank you very much. It helped me a lot

@Revathi-CodeData
Copy link

Revathi-CodeData commented Oct 21, 2020

I got following error,can you please help me
Connection error: ('Unable to connect to any servers', {'192.168.13.0': error(61, "Tried connecting to [('192.168.13.0', 9042)]. Last error: Connection refused")})

@zheltkov
Copy link

zheltkov commented Mar 13, 2021

If firewall is on you should allow connecting port
sudo firewall-cmd --zone=public --permanent --add-port=9042/tcp
sudo firewall-cmd --reload
(check it with telnet 192.168.13.0 9042)

@enkelmedia
Copy link

Thanks a lot for sharing this!

For me, on Cassandra 4.1.3 I got an error due to start_rpc: true, after removing this it worked great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment