Setting up Cassandra on Cloud9 IDE

时间:2016-04-04 17:12:10

标签: cassandra ide cloud9-ide cqlsh

I've followed these instructions to install Cassandra: http://docs.datastax.com/en/cassandra/2.0/cassandra/install/installDeb_t.html
When I do $ cqlsh terminal replies me with

Connection error: Could not connect to localhost:9160 

I read that the issue might be with configuration file cassandra.yaml
However, I turned out I can't access it. My etc/cassandra folder is empty: enter image description here

How to access cassandra.yaml?
Where is cassandra is stored in my project?
Is there a way to check if Cassandra is actually set up in project?

1 个答案:

答案 0 :(得分:1)

The image you have attached is showing the ~/.cassandra directory off of your home dir. That's not the same as/etc/cassandra. You should be able to confirm this with the following command:

$ ls -al /etc/cassandra/cassandra.yaml
-rw-r--r-- 1 cassandra cassandra 43985 Mar 11 12:46 /etc/cassandra/cassandra.yaml

To verify if Cassandra is even running, this should work for you if you have successfully completed the packaged install:

$ sudo service cassandra status

Otherwise, simply running this should work, too:

$ ps -ef | grep cassandra

When you set up Cassandra, you'll want to set the listen_address and rpc_address to the machine's hostname or IP. They're set to localhost by default, so if it's running cqlsh should connect to that automatically.

My guess is that Cassandra is not starting for you. Check the system.log file, which (for the packaged install) is stored in /var/logs/cassandra:

$ cat /var/log/cassandra/system.log

Check out that file, and you might find some clues as to what is happening here.

Also, did you really install Cassandra 2.0? That version has been deprecated, so for a new install you shouldn't go any lower than Cassandra 2.1.

相关问题