DataStax Devcenter fails to connect to the remote cassandra database

Viewed 16218

OS: CentOS 6.4 (server)

I have successfully installed (yum install dsc20) the cassandra database layer in my server and can connect to it using the CQL SHel (cqlsh). But I need to run queries remotely using the DataStax's DevCenter software. So I installed it (DevCenter) in a separate workstation. (CentOS 6.4 - desktop) and tried to add a new connection in order to connect to the cassandra db.

So I gave the IP of the "CentOS 6.4 - server" (in which cassandra database is running) for the host and the port as 9160. But when testing the connection it fails.

I also tried to turn off the firewall in the server, (/etc/init.d/iptables stop). But was no luck.

I'm sure this may be due to some misconfiguration which I cannot figure out. I'll be grateful, if someone can give me a solution for this as I was researching for this and found no answers. Thank you very much in advance.

4 Answers

If there's somebody working with docker locally, it can run this command.

docker run --name cassandra -p 127.0.0.1:9042:9042 -p 127.0.0.1:9160:9160 
-e CASSANDRA_LISTEN_ADDRESS=localhost 
-e CASSANDRA_BROADCAST_ADDRESS=localhost
-e CASSANDRA_RPC_ADDRESS=localhost -d cassandra
Related