卡桑德拉和 Cqlsh

Cassandra and Cqlsh

issaouedraogo$ cassandra -f  
[0.002s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:/usr/local/Cellar/cassandra/3.11.6_2/libexec/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.

aslo 尝试 运行 cqlsh 我收到以下错误

Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(61, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})

我个人不知道为什么? 我尝试了那里的所有资源,但它不起作用 任何人都可以帮助我

问题是您很可能使用了不受支持的 Java。您至少需要切换到 Java 8 u151,但最好是最新的。

此外,使用 services 确定 Cassandra 是否 运行ning 并不是一种可靠的检查方法。您应该改为 运行 nodetool status。干杯!