I am on a Mac OS and I run cassandra -f
and immediately this happens:
[0.002s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:/usr/local/apache-cassandra-3.0.10/logs/gc.log instead.
Unrecognized VM option 'UseParNewGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.```
I have no idea why this is happening. I did the proper
export CASSANDRA_HOME=/usr/local/apache-cassandra-3.0.10
export PATH=$PATH:$CASSANDRA_HOME/bin
But still it isnt working properly.
Is it something with my Java version? How can I do a complete clean install of Cassandra/get this to work?
In that version of Cassandra, the UseParNewGC
setting is defined in the jvm.options file. It is the first setting in the block of CMS GC JVM settings.
#################
# GC SETTINGS #
#################
### CMS Settings
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:+CMSParallelRemarkEnabled
I suspect one of two things are going on.
-XX:+UseParNewGC
setting is not appropriately specified. Double check this in your jvm.options file.-XX:+UseParNewGC
line is the first line in this block, the error appears to be here. The section above is where the heap sizing parameters are set, so I would check to see if something was uncommented or perhaps a quote was not properly closed.java -version
. Newer versions of Java (like 10 or 11 and higher) do not support the parallel garbage collector. Also, Cassandra 3.x only runs on Java 8, so you really don't have a reason to be on a recent JVM like that.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With