0

I Installed cassandra 3.11.4 using Brew. cassandra -v suggests me the cassandra is installed. But when I tried to do cassandra -f, I'm getting following error:

[0.001s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:/usr/local/Cellar/cassandra/3.11.4/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.

Installed JDK Version: 11

How can I fix this error?

cchantep
  • 9,118
  • 3
  • 30
  • 41
Sujit Baniya
  • 895
  • 9
  • 27

1 Answers1

2

The issue that you are having is that the jvm.options file has the default policy -XX:ThreadPriorityPolicy=42, if you are using Java 11 you should comment it. This file is located in the same directory where you can find the cassandra.yaml configuration file.

Also note that if you are using Java 11, you will need to replace all the gc-related settings with -Xlog:gc:/<your cassandra log path>/gc.log

Carlos Monroy Nieblas
  • 2,225
  • 2
  • 16
  • 27