8

I have novice to cassandra and tried my hands to install cassandra-2.1.2 on centos 7.0. After complete installation execute cqlsh command and created few keyspace(s) and column family. Which seems to me in first glance its working perfectly.

But later onwards i realized below issues:

1- when i execute "service cassandra status" command, i got below error:

Output:Cassandra dead but pid file exists.

I googled the above issue and found some links

http://www.datastax.com/support-forums/topic/dse-dead-but-pid-file-exists

https://baioradba.wordpress.com/2014/06/13/how-to-install-cassandra-on-centos-6-5/

and found that I had same configuration mentioned in above links but the same error still persists.

Please tell me the root cause and how to resolve it.

2- Second issue is in the cassandra.log file.

When I analysed the cassandra.log file there was an expection as :

Expecting URI in variable: [cassandra.config]. Please prefix the file with file:/// for local files or file://<server>/ for remote files. Aborting.

Below is the complete log:

12:01:40.816 [main] ERROR o.a.c.config.DatabaseDescriptor - Fatal configuration error
org.apache.cassandra.exceptions.ConfigurationException: Expecting URI in variable: [cassandra.config].  Please prefix the file with file:/// for local files or file://<server>/ for remote files.  Aborting.
    at org.apache.cassandra.config.YamlConfigurationLoader.getStorageConfigURL(YamlConfigurationLoader.java:73) ~[apache-cassandra-2.1.3.jar:2.1.3]
    at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:84) ~[apache-cassandra-2.1.3.jar:2.1.3]
    at org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:158) ~[apache-cassandra-2.1.3.jar:2.1.3]
    at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:133) ~[apache-cassandra-2.1.3.jar:2.1.3]
    at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:110) [apache-cassandra-2.1.3.jar:2.1.3]
    at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:465) [apache-cassandra-2.1.3.jar:2.1.3]
    at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:554) [apache-cassandra-2.1.3.jar:2.1.3]
Expecting URI in variable: [cassandra.config].  Please prefix the file with file:/// for local files or file://<server>/ for remote files.  Aborting.

Fatal configuration error; unable to start. See log for stacktrace.

I again searched the same issue in google and but the links were not that useful as they contained the java class code for cassandra.config .

Again please tell the root cause and how to resolve it?

Thanks in advance.

Milad Faridnia
  • 9,113
  • 13
  • 65
  • 78
Mohit Garg
  • 145
  • 1
  • 9
  • For the first question: check that cassandra is not running with `ps -aux`, then delete lock file in `/var/run/cassandra` – G Quintana Mar 04 '15 at 08:32
  • cassandra is running, when i execute : service cassandra status , then issue comes as Cassandra dead but pid exists – Mohit Garg Mar 04 '15 at 11:04

5 Answers5

1
rm /var/run/cassandra.pid

Run ps -ef | grep cassandra

Kill the pid of the cassandra process.

Start cassandra

Zippy
  • 1,804
  • 5
  • 27
  • 36
0

fix this issue, Edit the cassandra-env.sh:

sudo vi /etc/cassandra/conf/cassandra-env.sh

increase heap size for cassandra .. this should resolve your issue

0

Check if you have enough memory to start cassandra service with this command:

cat /proc/meminfo

I was running Hortonworks VM with Virtualbox, and I had a lot of Hadoop components started which needed a lot of memory, so for me the solution was to stop unnecessary Hadoop components and add some extra memory to the virtual machine.

Andras Kloczl
  • 8,415
  • 2
  • 21
  • 23
0

From https://github.com/apache/cassandra/blob/cassandra-2.1/examples/client_only/README.txt#L43-L49 :

cassandra.yaml can be on the classpath as is done here, can be specified (by modifying the script) in a location within the classpath like this: java -Xmx1G -Dcassandra.config=/path/in/classpath/to/cassandra.yaml ... or can be retrieved from a location outside the classpath like this: ... -Dcassandra.config=file:///path/to/cassandra.yaml ... or ... -Dcassandra.config=http://awesomesauce.com/cassandra.yaml ...

So you probably had a misconfigured startup option.

Serban Teodorescu
  • 1,350
  • 8
  • 5
-1

Remove the pid file. Try

rm /var/run/cassandra.pid
Jon Haddad
  • 766
  • 6
  • 17