首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Cassandra 2.2.1不会开始使用cassandra -f

Cassandra 2.2.1不会开始使用cassandra -f
EN

Stack Overflow用户
提问于 2015-10-01 04:38:41
回答 5查看 7.2K关注 0票数 2

我从apache.cassandra下载了卡桑德拉。

我已经确保了我的env路径变量被正确设置。

我在windows命令提示符中键入: cassandra -f,这就是我得到的:

代码语言:javascript
复制
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”文件吗?

任何需要帮助的人都将不胜感激。

EN

回答 5

Stack Overflow用户

回答已采纳

发布于 2019-07-30 12:07:13

  1. 在:C:\Program Files\apache-cassandra-3.11.3\conf" folder open the file - "cassandra-env中。
  2. 搜索:JAVA_HOME
  3. 它将显示由java exe文件代码创建的路径。
  4. 重复检查,确保路径正确。

您可以通过直接更新文件或更新环境变量来做到这一点,正如其他答案所解释的那样。

票数 5
EN

Stack Overflow用户

发布于 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之后。

这对我来说就是这样的。

票数 3
EN

Stack Overflow用户

发布于 2015-10-21 05:52:04

在设置Cassandra 2.1.11时,我刚刚面对并解决了一个类似的错误。在我的例子中,脚本需要一个JAVA_BIN环境变量。检查.ps1脚本并创建缺少的环境变量JAVA_BIN指向...\bin\java.exe。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32879568

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档