Cassandra安装 /在Windows 10上启动失败

发布于 2025-01-31 13:13:05 字数 5584 浏览 1 评论 0 原文

我正在尝试使Cassandra 3.11.13在我的Windows 10机器上运行。 有原因原因是我不能使用Docker以及为什么无法使用安装程序的原因。

我正在按照以下说明: https://phoenixnap.com/kb/kb/install-install-install-install-on-windows

在Windows命令提示符上,我启动 cassandra.bat 批处理文件。

有任何提示或提示我做错了什么?

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.

*---------------------------------------------------------------------*
*---------------------------------------------------------------------*

Ausnahme beim Aufrufen von "Start" mit 0 Argument(en):  "Falscher Parameter"
In D:\work\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:212 Zeichen:5


    $p.Start() | Out-Null
    ~~~~~~~~~~~~~~~~~~~~~
    CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
     FullyQualifiedErrorId : Win32Exception


Ausnahme beim Aufrufen von "WaitForExit" mit 0 Argument(en):  "Diesem Objekt ist kein Prozess zugeordnet."
In D:\...\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:213 Zeichen:5

    $p.WaitForExit()
    ~~~~~~~~~~~~~~~~
    CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    FullyQualifiedErrorId : InvalidOperationException


Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat.
In D:\work\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:214 Zeichen:5

    $stderr = $p.StandardError.ReadToEnd()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    FullyQualifiedErrorId : InvokeMethodOnNull



Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat.
In D:\...\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:218 Zeichen:9


    +     if ($stderr.Contains("Error"))
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull


Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat.
In D:\...\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:231 Zeichen:5

    +     $sa = $stderr.Split("""")
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull


Es ist nicht möglich, einen Index auf ein NULL-Array anzuwenden.
In D:\...\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:232 Zeichen:5


    +     $env:JVM_VERSION = $sa[1]
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray


Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat.
In D:\...\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:234 Zeichen:9

    if ($stderr.Contains("OpenJDK"))
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    FullyQualifiedErrorId : InvokeMethodOnNull



Es ist nicht möglich, einen Index auf ein NULL-Array anzuwenden.
In D:\work\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:247 Zeichen:5

$pa = $sa[1].Split("_")
    ~~~~~~~~~~~~~~~~~~~~~~~
    CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    FullyQualifiedErrorId : NullArray



Es ist nicht möglich, einen Index auf ein NULL-Array anzuwenden.
In D:\..\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:248 Zeichen: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 conf\cassandra.env.ps1 to suppress this warning.

*---------------------------------------------------------------------*
*---------------------------------------------------------------------*


Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat.
In D:\...\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:406 Zeichen:9

    if ($env:JVM_VERSION.CompareTo("1.8.0") -eq -1 -or [convert]::ToI ...
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    FullyQualifiedErrorId : InvokeMethodOnNull



Ausnahme beim Aufrufen von "Start" mit 0 Argument(en):  "Falscher Parameter"
In D:\...\tools\apache-cassandra-3.11.13\bin\cassandra.ps1:251 Zeichen:9

    $p.Start() | Out-Null
    ~~~~~~~~~~~~~~~~~~~~~
    CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    FullyQualifiedErrorId : Win32Exception


Ausnahme beim Aufrufen von "WaitForExit" mit 0 Argument(en):  "Diesem Objekt ist kein Prozess zugeordnet."
In D:\..\apache-cassandra-3.11.13\bin\cassandra.ps1:253 Zeichen:9
    $p.WaitForExit()
    ~~~~~~~~~~~~~~~~
    CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    FullyQualifiedErrorId : InvalidOperationException

I am trying to get Cassandra 3.11.13 running on my Windows 10 machine.
There are reasons why I can't do in with docker and why I can't use the installer.

I am following these instructions:
https://phoenixnap.com/kb/install-cassandra-on-windows

On a Windows command prompt, I launch the cassandra.bat batch file.

Any hints or tips what I am doing wrong?

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.

*---------------------------------------------------------------------*
*---------------------------------------------------------------------*

Ausnahme beim Aufrufen von "Start" mit 0 Argument(en):  "Falscher Parameter"
In D:\work\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:212 Zeichen:5


    $p.Start() | Out-Null
    ~~~~~~~~~~~~~~~~~~~~~
    CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
     FullyQualifiedErrorId : Win32Exception


Ausnahme beim Aufrufen von "WaitForExit" mit 0 Argument(en):  "Diesem Objekt ist kein Prozess zugeordnet."
In D:\...\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:213 Zeichen:5

    $p.WaitForExit()
    ~~~~~~~~~~~~~~~~
    CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    FullyQualifiedErrorId : InvalidOperationException


Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat.
In D:\work\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:214 Zeichen:5

    $stderr = $p.StandardError.ReadToEnd()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    FullyQualifiedErrorId : InvokeMethodOnNull



Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat.
In D:\...\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:218 Zeichen:9


    +     if ($stderr.Contains("Error"))
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull


Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat.
In D:\...\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:231 Zeichen:5

    +     $sa = $stderr.Split("""")
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull


Es ist nicht möglich, einen Index auf ein NULL-Array anzuwenden.
In D:\...\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:232 Zeichen:5


    +     $env:JVM_VERSION = $sa[1]
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray


Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat.
In D:\...\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:234 Zeichen:9

    if ($stderr.Contains("OpenJDK"))
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    FullyQualifiedErrorId : InvokeMethodOnNull



Es ist nicht möglich, einen Index auf ein NULL-Array anzuwenden.
In D:\work\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:247 Zeichen:5

$pa = $sa[1].Split("_")
    ~~~~~~~~~~~~~~~~~~~~~~~
    CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    FullyQualifiedErrorId : NullArray



Es ist nicht möglich, einen Index auf ein NULL-Array anzuwenden.
In D:\..\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:248 Zeichen: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 conf\cassandra.env.ps1 to suppress this warning.

*---------------------------------------------------------------------*
*---------------------------------------------------------------------*


Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat.
In D:\...\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:406 Zeichen:9

    if ($env:JVM_VERSION.CompareTo("1.8.0") -eq -1 -or [convert]::ToI ...
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    FullyQualifiedErrorId : InvokeMethodOnNull



Ausnahme beim Aufrufen von "Start" mit 0 Argument(en):  "Falscher Parameter"
In D:\...\tools\apache-cassandra-3.11.13\bin\cassandra.ps1:251 Zeichen:9

    $p.Start() | Out-Null
    ~~~~~~~~~~~~~~~~~~~~~
    CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    FullyQualifiedErrorId : Win32Exception


Ausnahme beim Aufrufen von "WaitForExit" mit 0 Argument(en):  "Diesem Objekt ist kein Prozess zugeordnet."
In D:\..\apache-cassandra-3.11.13\bin\cassandra.ps1:253 Zeichen:9
    $p.WaitForExit()
    ~~~~~~~~~~~~~~~~
    CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    FullyQualifiedErrorId : InvalidOperationException

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

依 靠 2025-02-07 13:13:05

该启动脚本在多个位置失败,因为它在计算机上安装了有关Java JVM的问题分析信息。这是一个失败的示例:

Ausnahme beim Aufrufen von "Start" mit 0 Argument(en):  "Falscher Parameter"
In D:\work\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:212 Zeichen:5

此问题的最常见原因是:

  • Cassandra找不到Java或Java未安装的
  • Java的Java版本不正确的

Java 3.11仅与Java 8一起使用。例如Java 11或Java 17。

确保您已经安装了Java 8,并且Java的环境变量在系统上正确配置了。

我还想让您知道,Cassandra 3.11中的Windows支持非常有限,并且由于操作系统的限制,有几个已知问题无法解决。

此外,由于缺乏维护者和测试,Cassandra 4.0已完全放弃了Windows的支撑()。

我意识到您已经提到您不能/不会在Docker上安装,但是我应该提到,作为解决方法,我们建议以下内容:

如果您只想用卡桑德拉作为后端构建应用程序,则

如果这些都不吸引您,恐怕您的选择是有限的。干杯!

The startup script is failing in multiple places because it is having issues parsing information about the Java JVM installed on the machine. Here is an example where it's failing:

Ausnahme beim Aufrufen von "Start" mit 0 Argument(en):  "Falscher Parameter"
In D:\work\tools\apache-cassandra-3.11.13\conf\cassandra-env.ps1:212 Zeichen:5

The most common causes of this issue are:

  • Cassandra cannot find Java or Java is not installed
  • incorrect version of Java is installed

Cassandra 3.11 only works with Java 8. It will not work with any newer versions of Java such as Java 11 or Java 17.

Make sure that you have installed Java 8 and that the environment variables for Java are configured correctly on your system.

I also wanted to let you know that there is very limited Windows support in Cassandra 3.11 and there are several known issues that will not be fixed due to limitations in the operating system.

Furthermore, Windows support has been completely dropped in Cassandra 4.0 due to lack of maintainers and testing (CASSANDRA-16171).

I realise you already mentioned that you can't/won't install on docker but I should mention that as a workaround, we recommend the following:

If you just want to build apps with Cassandra as a backend, Astra DB has a free tier that lets you launch a Cassandra cluster in a few clicks with no credit card required.

If none of these are appealing to you, I'm afraid that your options are limited. Cheers!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文