Cassandra 3.11.12将无法在Windows上使用Cassandra -f启动



我已经从apache.cassandra下载了cassandra.

我已经确保我的环境路径变量设置正确。

我在windows命令提示符中输入:cassandra -f,得到的结果如下:

Detected powershell execution permissions.  Running with enhanced startup scripts.
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
    WARNING!  Automatic page file configuration detected.
    It is recommended that you disable swap when running Cassandra
    for performance and stability reasons.
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
Exception calling "Start" with "0" argument(s): "The system cannot find the file specified"
At C:Cassandraapache-cassandra-3.11.12confcassandra-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:Cassandraapache-cassandra-3.11.12confcassandra-env.ps1:213 char:5
+     $p.WaitForExit()
+     ~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : InvalidOperationException
You cannot call a method on a null-valued expression.
At C:Cassandraapache-cassandra-3.11.12confcassandra-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:Cassandraapache-cassandra-3.11.12confcassandra-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:Cassandraapache-cassandra-3.11.12confcassandra-env.ps1:231 char:5
+     $sa = $stderr.Split("""")
+     ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
Cannot index into a null array.
At C:Cassandraapache-cassandra-3.11.12confcassandra-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:Cassandraapache-cassandra-3.11.12confcassandra-env.ps1:234 char:9
+     if ($stderr.Contains("OpenJDK"))
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
Cannot index into a null array.
At C:Cassandraapache-cassandra-3.11.12confcassandra-env.ps1:247 char:5
+     $pa = $sa[1].Split("_")
+     ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray
Cannot index into a null array.
At C:Cassandraapache-cassandra-3.11.12confcassandra-env.ps1:248 char:5
+     $subVersion = $pa[1]
+     ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
    WARNING! Detected a power profile other than High Performance.
    Performance of this node will suffer.
    Modify confcassandra.env.ps1 to suppress this warning.
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
You cannot call a method on a null-valued expression.
At C:Cassandraapache-cassandra-3.11.12confcassandra-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 system cannot find the file specified"
At C:Cassandraapache-cassandra-3.11.12bincassandra.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:Cassandraapache-cassandra-3.11.12bincassandra.ps1:253 char:9
+         $p.WaitForExit()
+         ~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : InvalidOperationException
这简直要把我逼疯了。我不明白这为什么这么难。

这个问题以前已经问过好几次了。在Windows上运行Cassandra有几个已知的问题,因此即使在Cassandra的早期版本中,支持也是有限的。我们最终在Cassandra 4.0 (Cassandra -16171)中完全放弃了Windows支持。

建议的解决方法是:

  • 在Docker中部署Cassandra
  • 使用VirtualBox等软件在VM中部署Cassandra
  • 使用K8ssandra.io在Kubernetes集群中部署Cassandra

如果你只是想学习如何在Cassandra上构建应用程序,Astra DB有一个免费的层,你可以在5次点击中启动一个集群。干杯!

相关内容

  • 没有找到相关文章

最新更新