Cannot connect to my Cassandra

As others have already suggested make sure your cassandra instance is running

ps axu | grep cassandra

If the output tells you that it is running you can check what ports it is listening on:

netstat -tulpn | grep -i listen | grep <pid>

where is the process id of your cassandra instance which you can get from the output of the first command.

You are interested to find the port 9160 in the output of this command. You will know from this what address it is listening on (if for some reason it is no longer a localhost).

If for some reason you can't find 9160 port in the list of the listening sockets then you might want to check your cassandra.yaml config file (search for rpc_port). You will also find there the address where thrift binds to to listen for clients on.


By default Thrift is not up, you have to start it with

nodetool enablethrift