Кассандра 3.11.6 не запускается Windows 10 - PullRequest
1 голос
/ 21 апреля 2020

Я новичок в Кассандре и использую Windows 10 для своей разработки. Но на этот раз Кассандра убивает мое время. Я просмотрел документацию, но все еще имею ту же проблему.

Мои шаги следующие:

  1. Windows 10 64 бит.
  2. Установлено Java jdk-14.0.1.
  3. Установить JAVA_Home.
  4. Установлено Cassandra-3.11.3
  5. Установлено Python.
  6. Установить необходимые переменные среды.
  7. Установить Execution Policy как Unrestricted для текущего пользователя в PowerShell.
  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

Img1

Img 2

Img 3

Ответы [ 2 ]

2 голосов
/ 21 апреля 2020
Установлено Java jdk-14.0.1.

Это самая большая проблема, которую я вижу здесь. Текущие выпуски Cassandra поддерживают только Java 1.8, поэтому вам нужно настроить его, прежде чем он заработает.

0 голосов
/ 03 мая 2020

Я столкнулся с той же проблемой, можете ли вы проверить свой путь JAVA_HOME в cassandra.bat? В моем случае мне нужно было просто удалить двойные кавычки из пути JAVA_HOME. Примерно так:

enter image description here

Это решило проблему для меня. Надеюсь, вы найдете это полезным.

...