Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't start Cassandra (Single-Node Cluster on CentOS7) [duplicate]

I would like to start Cassandra with a very simple single-node cluster, but I can't do it.

I followed the steps described at

https://www.digitalocean.com/community/tutorials/how-to-install-cassandra-and-run-a-single-node-cluster-on-a-ubuntu-vps

Basically,

  1. Built a fresh CentOS 7 virtual machine on VirtualBox.
  2. Installed JDK, put it under /usr/local/, and created pathes.
  3. Installed Apache Cassandra, put it under /root/, made directries for the lib and the log, and gave the writing rights to Cassandra.

At the end, when I ran below as root user,

# sh ~/cassandra/bin/cassandra

The message below appeared.

Running Cassandra as root user or group is not recommended - please start Cassandra using a different system user.
If you really want to force running Cassandra as root, use -R command line option.

So, I ran

# sh ~/cassandra/bin/cassandra -R

Then, I got the message below.

# [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:/root/cassandra/bin/../logs/gc.log instead.
intx ThreadPriorityPolicy=42 is outside the allowed range [ 0 ... 1 ]
Improperly specified VM option 'ThreadPriorityPolicy=42'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

It seems the issue is related to JVM, but I have no clue regarding its cause and solution.

Please let me know if you have ideas of how to solve this issue.

My environment is as below:

  • Windows 10
  • VirtualBox 5.1.28
  • CentOS-7-x86_64-Minimal-1611
  • jdk-9.0.1
  • apache-cassandra-3.11.1
like image 983
wiaylise Avatar asked Jan 29 '23 08:01

wiaylise


1 Answers

As undefined_variable commented, Java 8, instead of 9, worked just fine. Thanks everyone for trying to help.

like image 127
wiaylise Avatar answered Jan 31 '23 23:01

wiaylise