无法启动Cassandra(CentOS7上的单节点群集)

wia*_*ise 3 java linux centos cassandra

我想用一个非常简单的单节点集群启动Cassandra,但我不能这样做.

我遵循了描述的步骤

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

基本上,

  1. 在VirtualBox上构建了一个全新的CentOS 7虚拟机.
  2. 安装JDK,将其放在/ usr/local /下,并创建pathes.
  3. 安装了Apache Cassandra,将它放在/ root /下,为lib和日志做了直接操作,并给了Cassandra写权.

最后,当我以root用户身份运行时,

# sh ~/cassandra/bin/cassandra
Run Code Online (Sandbox Code Playgroud)

出现以下信息.

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.
Run Code Online (Sandbox Code Playgroud)

所以,我跑了

# sh ~/cassandra/bin/cassandra -R
Run Code Online (Sandbox Code Playgroud)

然后,我收到了下面的消息.

# [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.
Run Code Online (Sandbox Code Playgroud)

似乎问题与JVM有关,但我对其原因和解决方案一无所知.

如果您对如何解决此问题有任何想法,请告诉我.

我的环境如下:

  • Windows 10
  • VirtualBox 5.1.28
  • CentOS的-7-x86_64的 - 最小-1611
  • JDK-9.0.1
  • Apache的卡桑德拉-3.11.1

wia*_*ise 5

正如undefined_variable评论的那样,Java 8而不是9,工作得很好.谢谢大家帮忙.