1
votes

I'm having an issue that prevents me from starting Cassandra daemon.

I'm using Cassandra Community 2.1.4

I created my cluster several hours ago, and it was working perfectly until I rebooted the azure VM which is hosting this node. My cluster uses password authentication.

Any idea ?

edit : I dont know if it is relevant, but I tried to drop a keyspace before rebooting, and it failed. (no, i have not tried to drop system_auth keyspace, in case you wonder)

Cassandra log file contains:

ERROR [MemtableFlushWriter:3] 2015-04-14 13:42:54,359 CassandraDaemon.java:223 - Exception in thread Thread[MemtableFlushWriter:3,5,main] java.lang.RuntimeException: java.io.FileNotFoundException: /var/lib/cassandra/data/system_auth/users-473588ad9c7938be8b59e06c10456ba0/system_auth-users-tmp-ka-2-Index.db (Permission denied) at org.apache.cassandra.io.util.SequentialWriter.(SequentialWriter.java:80) ~[apache-cassandra-2.1.4.jar:2.1.4] at org.apache.cassandra.io.util.SequentialWriter.open(SequentialWriter.java:109) ~[apache-cassandra-2.1.4.jar:2.1.4] at org.apache.cassandra.io.util.SequentialWriter.open(SequentialWriter.java:104) ~[apache-cassandra-2.1.4.jar:2.1.4] at org.apache.cassandra.io.sstable.SSTableWriter$IndexWriter.(SSTableWriter.java:598) ~[apache-cassandra-2.1.4.jar:2.1.4] at org.apache.cassandra.io.sstable.SSTableWriter.(SSTableWriter.java:135) ~[apache-cassandra-2.1.4.jar:2.1.4] at org.apache.cassandra.db.Memtable$FlushRunnable.createFlushWriter(Memtable.java:404) ~[apache-cassandra-2.1.4.jar:2.1.4] at org.apache.cassandra.db.Memtable$FlushRunnable.writeSortedContents(Memtable.java:343) ~[apache-cassandra-2.1.4.jar:2.1.4] at org.apache.cassandra.db.Memtable$FlushRunnable.runMayThrow(Memtable.java:327) ~[apache-cassandra-2.1.4.jar:2.1.4] at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) ~[apache-cassandra-2.1.4.jar:2.1.4] at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297) ~[guava-16.0.jar:na] at org.apache.cassandra.db.ColumnFamilyStore$Flush.run(ColumnFamilyStore.java:1092) ~[apache-cassandra-2.1.4.jar:2.1.4] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_76] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_76] at java.lang.Thread.run(Thread.java:745) ~[na:1.7.0_76]

edit2

Several lines ago in log file:

WARN [main] 2015-04-14 14:06:59,068 CommitLogReplayer.java:139 - Encountered bad header at position 16 of commit log /var/lib/cassandra/commitlog/CommitLog-4-1429010621980.log, with invalid CRC. The end of segment marker should be zero.

Any way to fix that ?

1

1 Answers

1
votes

java.io.FileNotFoundException: /var/lib/cassandra/data/system_auth/users-473588ad9c7938be8b59e06c10456ba0/system_auth-users-tmp-ka-2-Index.db (Permission denied)

This line says, cassandra cannot create /var/lib/cassandra/data/system_auth/users-473588ad9c7938be8b59e06c10456ba0/system_auth-users-tmp-ka-2-Index.db without permission. Check if subdirectories' owner is cassandra. If no, assign it to the right owner cassandra and restart cassandra.

chown -R cassandra:cassandra /var/lib/cassandra/data/system_auth