Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My Cassandra used to work with no problems.

I was able to connect with no problems but now for some reason it doesn't work anymore.

[default@unknown] connect localhost/9160;
Exception connecting to localhost/9160. Reason: Connection refused.

and

root# ./bin/cassandra-cli -host localhost -port 9160
Exception connecting to localhost/9160. Reason: Connection refused.

I am on Linux Ubuntu Server.

Thanks in advance...

share|improve this question
    
Have your verified that the cassandra daemon is actually running? Find anything informative in its log files? –  andol Jul 31 '11 at 14:51
    
Did you check to see if Cassandra is listening on port 9160: lsof -i :9160, netstat -nl | grep 9160, ...? –  quanta Jul 31 '11 at 14:52

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.