【发布时间】:2017-10-27 15:30:23
【问题描述】:
我想用一个非常简单的单节点集群启动 Cassandra, 但我做不到。
我遵循了在
中描述的步骤基本上,
- 在 VirtualBox 上构建一个全新的 CentOS 7 虚拟机。
- 安装JDK,放到/usr/local/下,并创建路径。
- 安装了 Apache Cassandra,放在 /root/ 下,为 lib 和 log 建立了目录,并将写入权限授予 Cassandra。
最后,当我以root用户身份运行时,
# sh ~/cassandra/bin/cassandra
出现以下消息。
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.
所以,我跑了
# sh ~/cassandra/bin/cassandra -R
然后,我收到了下面的消息。
# [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.
看来这个问题与JVM有关, 但我不知道它的原因和解决方案。
如果您有解决此问题的想法,请告诉我。
我的环境如下:
- Windows 10
- VirtualBox 5.1.28
- CentOS-7-x86_64-Minimal-1611
- jdk-9.0.1
- apache-cassandra-3.11.1
【问题讨论】:
-
你试过不以root身份运行它吗?
-
用 java 8 代替 9 检查
-
@FuzzyAmi 是的,结果是一样的。
-
@undefined_variable 这变成了解决这个问题的方法,至少是最简单的方法。谢谢!
-
@skomp 请参阅我对 Simon Fontana Oscarsson 答案的评论。
标签: java linux cassandra centos