我从apache.cassandra下载了卡桑德拉。
我已经确保了我的env路径变量被正确设置。
我在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>快把我逼疯了。我不明白为什么这么难。
我在windows 10 pro上运行,空间很大。这是在笔记本电脑上,这应该可以工作,但当然,它不是。
我的cassandra.yaml文件很好。
我把本地主机作为我的“种子”。我应该把它设置为127.0.0.1,本地主机还是本地机器的IP?
我需要调整我的“etc/host”文件吗?
任何需要帮助的人都将不胜感激。
发布于 2019-07-30 12:07:13
C:\Program Files\apache-cassandra-3.11.3\conf" folder open the file - "cassandra-env中。JAVA_HOME您可以通过直接更新文件或更新环境变量来做到这一点,正如其他答案所解释的那样。
发布于 2018-11-14 09:58:22
这可能是卡桑德拉指出的JAVA_HOME env变量造成的。JAVA_HOME脚本文件中的.ps1环境变量指向JAVA_HOME\bin\java.exe,因此在您的系统中,环境变量应该排除"bin",即C:\ProgramFiles\Java\jdk1.8.0_172,以避免冲突,因为在JAVA_HOME自动在文件中附加bin\java.exe之后。
这对我来说就是这样的。
发布于 2015-10-21 05:52:04
在设置Cassandra 2.1.11时,我刚刚面对并解决了一个类似的错误。在我的例子中,脚本需要一个JAVA_BIN环境变量。检查.ps1脚本并创建缺少的环境变量JAVA_BIN指向...\bin\java.exe。
https://stackoverflow.com/questions/32879568
复制相似问题