我从 apache.cassandra 下载了 cassandra。
我已确保我的环境路径变量设置正确。
我在 Windows 命令提示符中输入:cassandra -f,这就是我得到的结果:
E:\apache-cassandra-2.2.1\bin>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 E:\apache-cassandra-2.2.1\conf\cassandra-env.ps1:249 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 E:\apache-cassandra-2.2.1\conf\cassandra-env.ps1:250 char:5
+ $p.WaitForExit()
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : InvalidOperationException
You cannot call a method on a null-valued expression.
At E:\apache-cassandra-2.2.1\conf\cassandra-env.ps1:251 char:5
+ $stderr = $p.StandardError.ReadToEnd()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At E:\apache-cassandra-2.2.1\conf\cassandra-env.ps1:255 char:9
+ if ($stderr.Contains("Error"))
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At E:\apache-cassandra-2.2.1\conf\cassandra-env.ps1:268 char:5
+ $sa = $stderr.Split("""")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Cannot index into a null array.
At E:\apache-cassandra-2.2.1\conf\cassandra-env.ps1:269 char:5
+ $env:JVM_VERSION = $sa[1]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
You cannot call a method on a null-valued expression.
At E:\apache-cassandra-2.2.1\conf\cassandra-env.ps1:271 char:9
+ if ($stderr.Contains("OpenJDK"))
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Cannot index into a null array.
At E:\apache-cassandra-2.2.1\conf\cassandra-env.ps1:284 char:5
+ $pa = $sa[1].Split("_")
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
Cannot index into a null array.
At E:\apache-cassandra-2.2.1\conf\cassandra-env.ps1:285 char:5
+ $env:JVM_PATCH_VERSION=$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.
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
You cannot call a method on a null-valued expression.
At E:\apache-cassandra-2.2.1\conf\cassandra-env.ps1:413 char:9
+ if (($env:JVM_VERSION.CompareTo("1.7") -eq 1) -and ($env:JVM_ARCH ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At E:\apache-cassandra-2.2.1\conf\cassandra-env.ps1:417 char:10
+ if ( (($env:JVM_VERSION.CompareTo("1.7") -ge 0) -and ($env:JVM_PA ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Exception calling "Start" with "0" argument(s): "The system cannot find the file specified"
At E:\apache-cassandra-2.2.1\bin\cassandra.ps1:249 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 E:\apache-cassandra-2.2.1\bin\cassandra.ps1:251 char:9
+ $p.WaitForExit()
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : InvalidOperationException
E:\apache-cassandra-2.2.1\bin>
Run Code Online (Sandbox Code Playgroud)
这让我抓狂。我不明白为什么这这么困难。
我运行的是 Windows 10 Pro,并且有足够的空间。这是在笔记本电脑上,这应该可以工作,但当然,事实并非如此。
我的 cassandra.yaml 文件没问题。
我正在运行 localhost 作为我的“种子”。我应该将其设置为 127.0.0.1、localhost 还是只是本地计算机的 IP?
我需要调整我的“etc/hosts”文件吗?
任何人提供帮助将不胜感激。
小智 5
C:\Program Files\apache-cassandra-3.11.3\conf" folder open the file - "cassandra-env。 JAVA_HOME 您可以通过直接更新文件或更新环境变量来完成此操作,如其他答案中所述。