I have Ubuntu 12.04 with cassandra 1.1.3 (tarball installation), When I try to start cassandra, I get the following:
user@ubuntu:~/apache-cassandra-1.1.3/bin
The problem may be caused by using OpenJDK, as described in a Cassandra bug report but, see the comments here for occurrences of this issue on Sun/Oracle and other JVMs:
If you cannot install the Oracle JVM, then try changing the stack size in the conf/cassandra-env.sh
configuration script. Look for the following section, at around line 185, and change the -Xss180k
to a higher value.
if [ "`uname`" = "Linux" ] ; then
# reduce the per-thread stack size to minimize the impact of Thrift
# thread-per-client. (Best practice is for client connections to
# be pooled anyway.) Only do so on Linux where it is known to be
# supported.
# u34 and greater need 180k
JVM_OPTS="$JVM_OPTS -Xss180k"
fi
echo "xss = $JVM_OPTS"
I have used 280k successfully when testing installations on Ubuntu servers at Rackspace and Amazon.
Based on reports in the comments below, I would either suggest increasing the stack size in 20k increments, starting with -Xss200k
, until Cassandra starts properly. Note that it is also possible to remove this option and use the default stack size per thread, but be aware of the impact this will have on memory consumption.
This is most likely caused by attempting to run under OpenJDK 1.6, which causes a segmentation fault under Ubuntu/Debian. The seg fault is hidden because of the way the shell script executes the process. You can test for this problem by modifying $CASSANDRA_HOME/bin/cassandra as follows:
Change this line:
exec $NUMACTL "$JAVA" $JVM_OPTS $cassandra_parms -cp "$CLASSPATH" $props "$class"
to this:
echo $NUMACTL "$JAVA" $JVM_OPTS $cassandra_parms -cp "$CLASSPATH" $props "$class"
Then run bin/cassandra -f
and copy the resulting java command. Run this directly to see if it produces the segmentation fault. If this is your problem, you need to switch to the Sun or IBM JDK, or alternatively you can upgrade to OpenJDK 1.7.
Try using the command - ./cassandra -f start if you are sure you have set up the env variables correctly
I had the same. Flowing steps helped me.
Remove cassandra
$ apt-get remove cassandra
Update apt repos
$ sudo add-apt-repository ppa:webupd8team/java
Reinstall java
$ sudo apt-get install oracle-java8-set-default
Install cassandra again
$ apt-get install cassandra
I was using information from that page