cassandra - 设置 apache-cassandra-3.11.8 时无法识别的 VM 选项 'UseParNewGC' 错误 : Could not create the Java Virtual Machine.

标签 cassandra jvm

当我在 cmd 上输入 cassandra 时,收到此错误消息。

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.

我的java版本是

java version "15" 2020-09-15
Java(TM) SE Runtime Environment (build 15+36-1562)
Java HotSpot(TM) 64-Bit Server VM (build 15+36-1562, mixed mode, sharing)

我使用的是Windows 10,两者都安装在C盘。谁能帮我解决这个问题吗?

最佳答案

您有 2 个问题:

  1. Windows 明确要求您执行 powershell Set-ExecutionPolicy Unrestricted 才能运行启动脚本
  2. 您使用的是 Cassandra 3.11 不支持的 Java 15 - 它仅适用于 Java 8,因此您需要降级 Java

附注我建议在 Windows 上的 Docker 中运行 Cassandra - 您将避免许多问题,因为 Windows 不是 Cassandra 的积极支持平台,并且 its support could be removed in the future .

关于cassandra - 设置 apache-cassandra-3.11.8 时无法识别的 VM 选项 'UseParNewGC' 错误 : Could not create the Java Virtual Machine.,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64237048/

相关文章:

java - Java 图形探查器?

c# - 如何在 Cassandra 中存储无符号整数?

jvm - 由于 JVM,启动 Sonar 失败

java - 启动本地 JBoss 服务器时出现 VM 错误

jvm - 是否可以使用 pypy 将 Java 字节码编译为 native 代码?

java - 在 Eclipse 中查看 gcmv 使用的堆数量?

hadoop - Cassandra 与 hadoop 集成以提高读取性能

cassandra - cassandra 中的提示超时

mysql - 如何从 MySQL 迁移到 Cassandra 建模

java - 无法使用 Hector 在 cassandra db 中插入值