Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cassandra dead but pid file exists

Tags:

cassandra

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.

like image 805
Mohit Garg Avatar asked Mar 04 '15 05:03

Mohit Garg


1 Answers

rm /var/run/cassandra.pid

Run ps -ef | grep cassandra

Kill the pid of the cassandra process.

Start cassandra

like image 154
maheswari vijayakumar Avatar answered Oct 02 '22 12:10

maheswari vijayakumar