windows 10 台机器上的 Cassandra 服务器启动问题

Cassandra Server starting issue on windows 10 machine

我正尝试在我的 Windows 10 机器上 运行 Cassandra 服务器。 在这个过程中:

Java: java 版本 "1.8.0_202" Python: Python 2.7.16

卡桑德拉:apache-cassandra-3.11.11

面对这个问题

好的,我能够让它工作。

我在我的 Windows 10 机器上下载了 Apache Cassandra 3.11.11,最近的补丁是 Java 8。我将它解压到我的用户 (c:\Users\aploetz\local\).在尝试 运行 它时,我遇到了我在您的编辑历史记录中看到的相同错误之一:

WARNING! Powershell script execution unavailable.
   Please use 'powershell Set-ExecutionPolicy Unrestricted'
   on this user-account to run cassandra with fully featured
   functionality on this platform.

因此,我在“开始”菜单中找到了我的本地 Windows Powershell,并且确定 select“运行 为管理员。”打开 window,我 运行 这个命令:

> set-executionpolicy -executionpolicy unrestricted

这不是最安全的做法,但不幸的是,如果没有它,Cassandra 就不会 运行 在 Windows 上。从那里开始,bin 目录中的 运行ning cassandra 工作了。

TBH,这种复杂性是导致 Windows 支持从 Apache Cassandra 项目中删除的部分原因。在 Windows 上使用 运行 Cassandra 的最简单方法是通过 Docker 或其他一些容器化平台。

> docker pull cassandra:3.11
> docker run --name my-cassandra -d -p 9042:9042 cassandra:3.11

编辑 20211214

我领导 webinar around addressing the recent licensing changes with Docker Desktop, discussing how to run Apache Cassandra on Windows w/ Minikube. Check the Git repo 了解更多信息。

补充一下 Aaron 的回复,Cassandra 3.11 中的 Windows 支持非常有限,并且有几个已知问题由于操作系统的限制而无法修复。

此外,由于缺乏维护者和测试 (CASSANDRA-16171),Windows Cassandra 4.0 中的支持已完全取消 (CASSANDRA-16171)。

作为解决方法,我们建议如下:

如果您只想使用 Cassandra 作为后端构建应用程序,Astra DB 有一个免费套餐,让您只需点击几下即可启动 Cassandra 集群,无需信用卡。干杯!

安装 java 1.8 和 Python 2.7 之后

设置 java、Python 和 Cassandra 的环境变量路径。

Open Windows PowerShell as administrator mode and run:

     => set-executionpolicy -executionpolicy unrestricted

Open Windows CMD as administrator mode and run:

     =>cassandra