Cassandra启动报错问题
前言
win10安装Cassandra3.11.11,jdk11,启动Cassandra报错,下面分享下解决方案。
报错一:Unrecognized VM option ‘UseParNewGC’
具体报错内容:
WARNING! Powershell script execution unavailable.
Please use ‘powershell Set-ExecutionPolicy Unrestricted’
on this user-account to run cassandra with fully featured
functionality on this platform.
Starting with legacy startup options
Starting Cassandra Server
Unrecognized VM option ‘UseParNewGC’
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
原因是:
此收集器在 JDK 9 中已弃用,并在 JDK 10 中删除。
解决方案:
删掉-XX:+UseParNewGC^
报错二:A fatal error has been detected by the Java Runtime Environment
具体报错内容:
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000010014ed4, pid=26028, tid=25416
JRE version: Java™ SE Runtime Environment 18.9 (11.0.12+8) (build 11.0.12+8-LTS-237)
Java VM: Java HotSpot™ 64-Bit Server VM 18.9 (11.0.12+8-LTS-237, mixed mode, tiered, compressed oops, concurrent mark sweep gc, windows-amd64)
Problematic frame:
C [sigar-amd64-winnt.dll+0x14ed4]
No core dump will be written. Minidumps are not enabled by default on client versions of Windows
原因是:当前jdk11版本过高
解决方案:
更换为jdk1.8,重启电脑再启动。