无法在Windows 10上启动cassandra

问题描述 投票:1回答:2

我是这个领域的新手,并且正在尝试使用cassandra(Datastax)。我根据他们网站上给出的指示填写了JDK和cassandra。

但是当我试图运行CQL shell时,我遇到了错误。我搜索找到一个解决方案,但找不到。

重新安装了cassandra但没有帮助。你能建议任何解决方案吗?

    C:\Program Files\DataStax-DDC\apache-cassandra\bin>cqlsh 127.0.0.1 9042
Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(10061, "Tried connecting to [('127.0.0.1', 9042)]. Last error: No connection could be made because the target machine actively refused it")})
cassandra datastax cql
2个回答
2
投票

安装后,DataStax Cassandra会添加一项用于运行Cassandra Server的服务。但是,该服务可能无法在启动时运行,并可能拒绝运行。

请尝试以下命令:

net start DataStax_DDC_Server

如果你看到这样的消息:

The DataStax DDC Server 3.8.0 service could not be started.

然后你遇到了这个问题。

如果你正在使用Community Edition(像我一样),支持已经停止,所以我不希望将来修复。

同时,还提供手动解决方法。

首先,将C:\ Program Files \ DataStax-DDC \ apache-cassandra \ bin附加到您环境中的PATH变量,以使生活更轻松。

现在打开两个CLI(或Powershell窗口)。

在第一个中,运行命令:

cassandra -f

观看输出。寻找一条线,如:

INFO  nn:nn:nn Starting listening for CQL clients on /<ip address>:<port>

服务器现在正在侦听连接。

保持第一个CLI运行,并切换到第二个CLI。运行命令:

cqlsh <ip address> <port>

希望它应该工作。

附录:默认情况下,您无法在Windows 10 Datastax Cassandra中完成制表。要解决这个问题,需要将pyreadline python模块复制到DataStax-DDC \ python \ Lib \ site-packages文件夹中(复制,未安装.DataStax python发行版无法安装模块)。


0
投票

对于64位v3.0.9(我通过.msi安装了here

如果您在安装时没有选中“自动启动DataStax Cassandra社区服务”,则需要重新安装并保持选中状态。

转到C:\Program Files\DataStax Community并将文件cassandra.ymal.orig重命名为cassandra.yaml并将其保留在已经存在的文件夹中,然后启动Cassandra CQL Shell。

注意:我不知道是否需要它但我在执行此操作之前备份了我的cassandra.yaml.orig。

此外,如果有人能够了解Windows的命令是什么启动Cassandra将是非常棒的。至少在某种程度上,这个问题似乎是服务无法启动

© www.soinside.com 2019 - 2024. All rights reserved.