【问题标题】:Cassandra 3.11.6 not starting Windows 10Cassandra 3.11.6 未启动 Windows 10
【发布时间】:2020-08-04 14:26:43
【问题描述】:

我是 Cassandra 的新手,我正在使用 Windows 10 进行开发。但这一次 Cassandra 正在消磨我的时间。我已经浏览了文档,但仍然遇到同样的问题。

我的步骤如下:

  1. Windows 10 64 位。
  2. 已安装 Java jdk-14.0.1。
  3. 设置 JAVA_Home。
  4. 已安装 Cassandra-3.11.3
  5. 已安装 Python。
  6. 设置必要的环境变量。
  7. PowerShell中的当前用户将Execution Policy设置为Unrestricted
  8. 然后在Cassandra\bin 文件夹中运行cassandra.bat

但它显示以下错误:

PS C:\Program Files\apache-cassandra-3.11.6\bin> .\cassandra.bat -f

检测到 powershell 执行权限。使用增强的启动脚本运行。

WARNING!  1 swap file(s) detected
    Name: c:\pagefile.sys
It is recommended that you disable swap when running Cassandra
for performance and stability reasons.

Exception calling "Start" with "0" argument(s): "The parameter is incorrect"
At C:\Program Files\apache-cassandra-3.11.6\conf\cassandra-env.ps1:212 char:5
+     $p.Start() | Out-Null
+     ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : Win32Exception

Exception calling "WaitForExit" with "0" argument(s): "No process is associated with this object."
At C:\Program Files\apache-cassandra-3.11.6\conf\cassandra-env.ps1:213 char:5
+     $p.WaitForExit()
+     ~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : InvalidOperationException

You cannot call a method on a null-valued expression.
At C:\Program Files\apache-cassandra-3.11.6\conf\cassandra-env.ps1:214 char:5
+     $stderr = $p.StandardError.ReadToEnd()
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At C:\Program Files\apache-cassandra-3.11.6\conf\cassandra-env.ps1:218 char:9
+     if ($stderr.Contains("Error"))
+         ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At C:\Program Files\apache-cassandra-3.11.6\conf\cassandra-env.ps1:231 char:5
+     $sa = $stderr.Split("""")
+     ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Cannot index into a null array.
At C:\Program Files\apache-cassandra-3.11.6\conf\cassandra-env.ps1:232 char:5
+     $env:JVM_VERSION = $sa[1]
+     ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

You cannot call a method on a null-valued expression.
At C:\Program Files\apache-cassandra-3.11.6\conf\cassandra-env.ps1:234 char:9
+     if ($stderr.Contains("OpenJDK"))
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Cannot index into a null array.
At C:\Program Files\apache-cassandra-3.11.6\conf\cassandra-env.ps1:247 char:5
+     $pa = $sa[1].Split("_")
+     ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

Cannot index into a null array.
At C:\Program Files\apache-cassandra-3.11.6\conf\cassandra-env.ps1:248 char:5
+     $subVersion = $pa[1]
+     ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

You cannot call a method on a null-valued expression.
At C:\Program Files\apache-cassandra-3.11.6\conf\cassandra-env.ps1:406 char:9
+     if ($env:JVM_VERSION.CompareTo("1.8.0") -eq -1 -or [convert]::ToI ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Exception calling "Start" with "0" argument(s): "The parameter is incorrect"
At C:\Program Files\apache-cassandra-3.11.6\bin\cassandra.ps1:251 char:9
+         $p.Start() | Out-Null
+         ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : Win32Exception

Exception calling "WaitForExit" with "0" argument(s): "No process is associated with this object."
At C:\Program Files\apache-cassandra-3.11.6\bin\cassandra.ps1:253 char:9
+         $p.WaitForExit()
+         ~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : InvalidOperationException

【问题讨论】:

  • 发布格式良好的错误消息绝对比截图更可取。

标签: java cassandra cassandra-3.0


【解决方案1】:
  1. 已安装 Java jdk-14.0.1。

这是我在这里看到的最大问题。当前版本的 Cassandra 仅支持 Java 1.8,因此您需要先进行设置才能使用它。

【讨论】:

    【解决方案2】:

    我遇到了同样的问题,你能在 cassandra.bat 中检查你的 JAVA_HOME 路径吗? 在我的情况下,我必须从 JAVA_HOME 路径中删除双引号。 像这样的:

    这解决了我的问题。希望对您有用。

    【讨论】:

      猜你喜欢
      • 2020-07-15
      • 2017-07-21
      • 2021-11-26
      • 2021-05-15
      • 1970-01-01
      • 2021-10-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多